From 632ade111b748af0c389746c9ba112dd86db7d64 Mon Sep 17 00:00:00 2001 From: Feng Ruohang Date: Tue, 4 Aug 2026 22:44:59 +0800 Subject: [PATCH] build: pin golangci-lint installation Installing golangci-lint from the moving master branch made local and CI results depend on the day they ran. Pin v2.11.3 and install it into a versioned path so version changes cannot accidentally reuse a stale binary. Co-authored-by: ChatGPT Co-authored-by: Claude --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d0846b2f1..fd306ef15 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ LDFLAGS := $(shell go run buildscripts/gen-ldflags.go) GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) +GOLANGCI_VERSION ?= v2.11.3 VERSION ?= $(shell git describe --tags) REPO ?= quay.io/minio @@ -23,7 +24,10 @@ help: ## print this help getdeps: ## fetch necessary dependencies @mkdir -p ${GOPATH}/bin - @echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOLANGCI_DIR) + @if [ ! -x "$(GOLANGCI)" ]; then \ + echo "Installing golangci-lint $(GOLANGCI_VERSION)"; \ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/$(GOLANGCI_VERSION)/install.sh | sh -s -- -b $(GOLANGCI_DIR) $(GOLANGCI_VERSION); \ + fi crosscompile: ## cross compile minio @(env bash $(PWD)/buildscripts/cross-compile.sh)