From d0dcebea454e8a6fdd4cadbf3276c613a5aa6b5a Mon Sep 17 00:00:00 2001 From: Gary Holtz Date: Thu, 29 Jun 2023 20:59:09 -0500 Subject: [PATCH] fix: goreleaser deprecated replacements, fixing the filename templates --- .goreleaser.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 8b9daa46..f6bb6cbf 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -85,37 +85,40 @@ archives: - id: nix builds: [macos, linux] <<: &archive_defaults - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + name_template: >- + {{ .ProjectName }}_ + {{- .Version }}_ + {{- if eq .Os "darwin" }}macOS + {{- else if eq .Os "linux" }}Linux + {{- else if eq .Os "windows" }}Windows{{ end }}_ + {{- if eq .Arch "386" }}i386 + {{- else if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "arm" }}arm + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} wrap_in_directory: false format: tar.gz - replacements: - darwin: macOS - linux: Linux - <<: &arch_replacemens - 386: i386 - amd64: x86_64 - id: windows builds: [windows] <<: *archive_defaults format: zip - replacements: - windows: Windows - <<: *arch_replacemens nfpms: - id: foo package_name: glab - file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + file_name_template: >- + {{ .ProjectName }}_ + {{- .Version }}_ + {{- if eq .Os "darwin" }}macOS + {{- else if eq .Os "linux" }}Linux{{ end }}_ + {{- if eq .Arch "386" }}i386 + {{- else if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} # Build IDs for the builds you want to create NFPM packages for. # Defaults to all builds. - replacements: - amd64: x86_64 - 386: i386 - darwin: macOS - linux: Linux vendor: GitLab homepage: https://gitlab.com/gitlab-org/cli # using service-desk email https://docs.gitlab.com/ee/user/project/service_desk.html