Skip to content

Commit

Permalink
📚 Rewrite documentation to focus on use-cases (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
busser authored May 28, 2023
1 parent 46b4698 commit 98f70ab
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 189 deletions.
68 changes: 54 additions & 14 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,71 @@
before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
main: ./
- id: murmur
binary: murmur
env: [CGO_ENABLED=0]
goos: [linux, windows, darwin]
main: ./
# The project was renamed "murmur" in May 2023. For backwards compatibility,
# we continue to publish artifacts named "whisper".
- id: whisper
binary: whisper
env: [CGO_ENABLED=0]
goos: [linux, windows, darwin]
main: ./

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- id: murmur
builds: [murmur]
name_template: >-
{{- .ProjectName }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip
# The project was renamed "murmur" in May 2023. For backwards compatibility,
# we continue to publish artifacts named "whisper".
- id: whisper
builds: [whisper]
name_template: >-
whisper_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip

dockers:
- image_templates:
- id: murmur
ids: [murmur]
build_flag_templates:
- --build-arg=BINARY=murmur
image_templates:
- ghcr.io/busser/murmur:{{ .Tag }}
- ghcr.io/busser/murmur:v{{ .Major }}.{{ .Minor }}
- ghcr.io/busser/murmur:v{{ .Major }}
- ghcr.io/busser/murmur:latest
# The project was renamed "murmur" in May 2023. For backwards compatibility,
# we continue to publish artifacts named "whisper".
- id: whisper
ids: [whisper]
build_flag_templates:
- --build-arg=BINARY=whisper
image_templates:
- ghcr.io/busser/whisper:{{ .Tag }}
- ghcr.io/busser/whisper:v{{ .Major }}.{{ .Minor }}
- ghcr.io/busser/whisper:v{{ .Major }}
- ghcr.io/busser/whisper:latest

checksum:
name_template: "checksums.txt"
snapshot:
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM scratch

ARG BINARY=murmur

LABEL org.opencontainers.image.source=https://github.com/busser/murmur

# The binary is built beforehand.
COPY murmur /
COPY ${BINARY} /

ENTRYPOINT ["/murmur"]
ENTRYPOINT ["/${BINARY}"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ build: fmt vet ## Build murmur binary.
release: test ## Release a new version.
git tag -a "$(VERSION)" -m "$(VERSION)"
git push origin "$(VERSION)"
goreleaser release --rm-dist
goreleaser release --clean
Loading

0 comments on commit 98f70ab

Please sign in to comment.