Skip to content

Commit

Permalink
OPTIM/MINOR: goreleaser: don't use deprecated field to generate archi…
Browse files Browse the repository at this point in the history
…ve names

Signed-off-by: Vincent Gramer <vgramer@haproxy.com>
  • Loading branch information
vgramer committed Jul 19, 2023
1 parent a453e0c commit 74c75c4
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,23 @@ builds:
- ppc64le
- s390x
archives:
- name_template: "{{.Binary}}_{{.Version}}_{{.Os}}_{{.Arch}}"
replacements:
darwin: Darwin
linux: Linux
386: i386
amd64: x86_64
freebsd: FreeBSD
- name_template: |-
{{- $prettyOS := .Os -}}
{{- if eq $prettyOS "darwin" -}}
{{- $prettyOS = "Darwin" -}}
{{- else if eq $prettyOS "linux" -}}
{{- $prettyOS = "Linux" -}}
{{- else if eq $prettyOS "freebsd" -}}
{{- $prettyOS = "FreeBSD" -}}
{{- end -}}
{{- $prettyArch := .Arch -}}
{{- if eq $prettyArch "386" -}}
{{- $prettyArch = "i386" -}}
{{- else if eq $prettyArch "amd64" -}}
{{- $prettyArch = "x86_64" -}}
{{- end -}}
{{.Binary}}_{{.Version}}_{{$prettyOS}}_{{$prettyArch}}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down

0 comments on commit 74c75c4

Please sign in to comment.