Skip to content

Commit 26130f2

Browse files
committed
fix: migrate goreleaser from v1 to v2 to fix Go 1.25+ build failure
Goreleaser v1.x depends on golang.org/x/tools v0.8.0-v0.25.0, which fail to compile with Go 1.25+ due to stricter constant evaluation (golang/go#74462). Migrate to goreleaser v2.15.4 which uses x/tools v0.44.0. Config changes for v2: - Add version: 2 header - archives.builds -> archives.ids - archives.format -> archives.formats (list syntax) Signed-off-by: Ray Krueger <raykrueger@gmail.com>
1 parent 5bca89b commit 26130f2

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

.goreleaser.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
builds:
23
# clusterctl-aws
34
- id: "clusterctl-aws"
@@ -46,15 +47,15 @@ builds:
4647

4748
archives:
4849
- id: clusterctl-aws
49-
builds:
50+
ids:
5051
- clusterctl-aws
5152
name_template: "clusterctl-aws-{{ .Os }}-{{ .Arch }}"
52-
format: binary
53+
formats: ["binary"]
5354
- id: clusterawsadm
54-
builds:
55+
ids:
5556
- clusterawsadm
5657
name_template: "clusterawsadm-{{ .Os }}-{{ .Arch }}"
57-
format: binary
58+
formats: ["binary"]
5859

5960
release:
6061
discussion_category_name: General

hack/tools/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ $(RELEASE_NOTES): ## Build release notes from tools folders.
167167

168168
GORELEASER_BIN := goreleaser
169169
GORELEASER := $(BIN_DIR)/$(GORELEASER_BIN)
170-
GORELEASER_PKG := github.com/goreleaser/goreleaser
170+
GORELEASER_PKG := github.com/goreleaser/goreleaser/v2
171171
.PHONY: $(GORELEASER_BIN)
172172
$(GORELEASER_BIN): $(GORELEASER)
173173

versions.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ KPROMO_VERSION := v4.0.5
2020
YQ_VERSION := v4.25.2
2121
GOLANGCI_LINT_VERSION := v2.7.0
2222
RELEASE_NOTES_VERSION := v0.16.5
23-
GORELEASER_VERSION := v1.24.0
23+
GORELEASER_VERSION := v2.15.4

0 commit comments

Comments
 (0)