Skip to content

Commit 4c3806d

Browse files
vgrameroktalz
authored andcommitted
OPTIM/MINOR: goreleaser: don't use deprecated field to generate archive names
Signed-off-by: Vincent Gramer <[email protected]>
1 parent dc85732 commit 4c3806d

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

.goreleaser.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,23 @@ builds:
3737
- ppc64le
3838
- s390x
3939
archives:
40-
- name_template: "{{.Binary}}_{{.Version}}_{{.Os}}_{{.Arch}}"
41-
replacements:
42-
darwin: Darwin
43-
linux: Linux
44-
386: i386
45-
amd64: x86_64
46-
freebsd: FreeBSD
40+
- name_template: |-
41+
{{- $prettyOS := .Os -}}
42+
{{- if eq $prettyOS "darwin" -}}
43+
{{- $prettyOS = "Darwin" -}}
44+
{{- else if eq $prettyOS "linux" -}}
45+
{{- $prettyOS = "Linux" -}}
46+
{{- else if eq $prettyOS "freebsd" -}}
47+
{{- $prettyOS = "FreeBSD" -}}
48+
{{- end -}}
49+
50+
{{- $prettyArch := .Arch -}}
51+
{{- if eq $prettyArch "386" -}}
52+
{{- $prettyArch = "i386" -}}
53+
{{- else if eq $prettyArch "amd64" -}}
54+
{{- $prettyArch = "x86_64" -}}
55+
{{- end -}}
56+
{{.Binary}}_{{.Version}}_{{$prettyOS}}_{{$prettyArch}}
4757
checksum:
4858
name_template: 'checksums.txt'
4959
snapshot:

0 commit comments

Comments
 (0)