From 926daece06e0302e30e92bc8df069946442a7b6a Mon Sep 17 00:00:00 2001 From: Michael Riley Date: Thu, 24 Aug 2023 09:24:53 -0400 Subject: [PATCH] Remove replacement and use name template in goreleaser archives (#342) * Remove replacement and use name template in goreleaser * Use name_template conditions for replacements --- .goreleaser.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index dcd434f8..dc7426a8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -24,12 +24,14 @@ builds: archives: - - replacements: - darwin: macOs - linux: linux - windows: windows - amd64: 64-bit - arm64: arm64-bit + name_template: >- + {{- .ProjectName }}_v + {{- .Version }}_ + {{- if .Os eq "darwin" }}macOs + {{- else }}{{ .Os }}{{ end }}_ + {{- if .Arch eq "amd64" }}x64 + {{- else if .Arch eq "arm64" }}arm64 + {{- else if .Arch eq "arm" }}arm32-v{{ .Arm }}{{ end }} format: tar.gz @@ -40,7 +42,6 @@ archives: - goos: windows format: zip - checksum: name_template: "{{ .ProjectName }}_v{{ .Version }}_checksums.txt" algorithm: sha256