From d860deeb03e81c243961f00abe341bbe9ee00b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Sat, 23 Nov 2024 21:44:03 -0500 Subject: [PATCH 1/2] Upgrade goreleaser to version 2 --- .goreleaser.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a75c965..631104b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,5 +1,6 @@ # Mokey goreleaser configs # See here: https://goreleaser.com +version: 2 before: hooks: - go mod tidy @@ -18,11 +19,15 @@ builds: - osusergo - netgo archives: - - replacements: - linux: linux - amd64: x86_64 + - id: release wrap_in_directory: true - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}" + name_template: >- + {{- .ProjectName }}- + {{- .Version }}- + {{- .Os }}- + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "arm64" }}aarch64 + {{- else }}{{ .Arch }}{{ end }} files: - LICENSE - NOTICE @@ -45,7 +50,12 @@ nfpms: scripts: postinstall: ./scripts/nfpm/postinstall.sh rpm: - file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}" + file_name_template: >- + {{- .ProjectName }}- + {{- .Version }}- + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "arm64" }}aarch64 + {{- else }}{{ .Arch }}{{ end }} scripts: postinstall: ./scripts/nfpm/postinstall.sh rpm: @@ -66,7 +76,7 @@ nfpms: checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ incpatch .Version }}-SNAPSHOT-{{.ShortCommit}}" + version_template: "{{ incpatch .Version }}-SNAPSHOT-{{.ShortCommit}}" changelog: sort: desc groups: From 40690efeeb6de40f4e28a0d6316e44cb7d044548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Sat, 23 Nov 2024 21:44:57 -0500 Subject: [PATCH 2/2] Add arm64 to list of goreleaser architecture --- .goreleaser.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 631104b..2d4775e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -9,6 +9,7 @@ builds: - CGO_ENABLED=1 goarch: - amd64 + - arm64 goos: - linux ldflags: