From c368840224dcbb297c121ade9e771fde71ee7828 Mon Sep 17 00:00:00 2001 From: Spencer Schrock Date: Tue, 18 Feb 2025 09:20:37 -0700 Subject: [PATCH] omit vcs info from build The detected info is interfering with the manually specified Scorecard version in the LDFLAGS. While `buildvcs` has been present since Go 1.18, Go 1.24 changed the behavior again. Our docker image uses Go 1.24 as of 3676bbc29082184ac34a84d1573c0419f81c4a68. https://go.dev/doc/go1.24#go-command Signed-off-by: Spencer Schrock --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c7b03159..c575fdd3 100644 --- a/Makefile +++ b/Makefile @@ -3,4 +3,4 @@ LDFLAGS=-X sigs.k8s.io/release-utils/version.gitVersion=v5.1.1 -X sigs.k8s.io/re build: ## Runs go build on repo # Run go build and generate scorecard executable - CGO_ENABLED=0 go build -o scorecard-action -trimpath -a -tags netgo -ldflags '$(LDFLAGS)' + CGO_ENABLED=0 go build -o scorecard-action -trimpath -a -tags netgo -buildvcs=false -ldflags '$(LDFLAGS)'