Skip to content

Commit 3d7bdaa

Browse files
mjudeikis-botmjudeikis
andcommitted
fix: switch golangci-lint install to binary download via uget.sh
Using 'go install' for golangci-lint v2 failed in prow because the Go toolchain version requirement caused install failures. Switch to downloading the pre-built binary directly from GitHub Releases, matching how kcp manages golangci-lint. Also removes the 'v' prefix from GOLANGCI_LINT_VER (uget.sh uses version without 'v' in the download URL). Signed-off-by: mjudeikis-bot <mjudeikis-bot@faros.sh> Co-authored-by: Mangirdas Judeikis <mangirdas@judeikis.lt>
1 parent 3ce0263 commit 3d7bdaa

2 files changed

Lines changed: 656 additions & 2 deletions

File tree

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ OPENSHIFT_GOIMPORTS_BIN := openshift-goimports
4444
OPENSHIFT_GOIMPORTS := $(TOOLS_DIR)/$(OPENSHIFT_GOIMPORTS_BIN)-$(OPENSHIFT_GOIMPORTS_VER)
4545
export OPENSHIFT_GOIMPORTS # so hack scripts can use it
4646

47-
GOLANGCI_LINT_VER := v2.10.1
47+
GOLANGCI_LINT_VER := 2.10.1
4848
GOLANGCI_LINT_BIN := golangci-lint
4949
GOLANGCI_LINT := $(TOOLS_GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER)
5050

@@ -112,7 +112,10 @@ install: require-jq require-go require-git verify-go-versions ## Install the pro
112112
.PHONY: install
113113

114114
$(GOLANGCI_LINT):
115-
GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/golangci/golangci-lint/v2/cmd/golangci-lint $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER)
115+
@UGET_DIRECTORY=$(TOOLS_GOBIN_DIR) UGET_VERSIONED_BINARIES=true hack/uget.sh \
116+
https://github.com/golangci/golangci-lint/releases/download/v{VERSION}/golangci-lint-{VERSION}-{GOOS}-{GOARCH}.tar.gz \
117+
$(GOLANGCI_LINT_BIN) \
118+
$(GOLANGCI_LINT_VER)
116119

117120
$(STATICCHECK):
118121
GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) honnef.co/go/tools/cmd/staticcheck $(STATICCHECK_BIN) $(STATICCHECK_VER)

0 commit comments

Comments
 (0)