From 61ae460f46e278b8a220c2336305e72bc905577b Mon Sep 17 00:00:00 2001 From: sheepla <62412884+sheepla@users.noreply.github.com> Date: Sat, 31 Dec 2022 18:31:11 +0900 Subject: [PATCH] Fix .goreleaser.yaml > archives.replacements c.f. https://goreleaser.com/deprecations/#archivesreplacements --- .goreleaser.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2826e67..8e09197 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,7 +8,7 @@ before: - go generate ./... builds: - env: - - CGO_ENABLED=0 + - CGO_ENABLED=1 goos: - linux - windows @@ -16,15 +16,13 @@ builds: ldflags: - -w -s -X main.appVersion={{.Version}} -X main.appRevision={{.Commit}} archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 - format_overrides: - - goos: windows - format: zip + - id: foo + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} checksum: name_template: 'checksums.txt' snapshot: