From 68d838364771d760c7f9a5e327b1634c1a8884d6 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 9 Jun 2024 03:46:07 -0400 Subject: [PATCH 1/2] update goreleaser config: * --rm-dist is replaced by --clean * `replacements` is removed: https://goreleaser.com/deprecations/#archivesreplacements --- .goreleaser.yml | 9 +++++---- Makefile | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 98f8c206..831dea3c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -43,11 +43,12 @@ builds: archives: - - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" + name_template: >- + {{ .ProjectName }}-{{ .Version }}- + {{- if eq .Os "darwin" }}macos{{- else }}{{ .Os }}{{ end -}}- + {{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end -}} + {{ if .Arm }}v{{ .Arm }}{{ end -}} format: tar.gz - replacements: - amd64: x86_64 - darwin: macos format_overrides: - goos: windows format: zip diff --git a/Makefile b/Makefile index 0a6bcf0e..e981867d 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ build: go build -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)" release: - goreleaser --skip-publish --rm-dist + goreleaser --skip-publish --clean capdefs: python3 ./gencapdefs.py > ${capdef_file} From ae704b7db4156a26ef703bf1eb10e33222b5d065 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 9 Jun 2024 04:25:23 -0400 Subject: [PATCH 2/2] update to goreleaser v2 * goreleaser version must be specified in .goreleaser.yml * --skip-publish is replaced by --skip=publish --- .goreleaser.yml | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 831dea3c..3e7d553b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ # .goreleaser.yml # Build customization +version: 2 project_name: ergo builds: - main: ergo.go diff --git a/Makefile b/Makefile index e981867d..804efeae 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ build: go build -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)" release: - goreleaser --skip-publish --clean + goreleaser --skip=publish --clean capdefs: python3 ./gencapdefs.py > ${capdef_file}