From d288f225eeee083d7567c9a662df2e6937b4dc12 Mon Sep 17 00:00:00 2001 From: unkin-agent Date: Sat, 26 Sep 2026 22:22:33 +1000 Subject: [PATCH] Rename GOFLAGS make variable to LDFLAGS --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3aded89..86c62e3 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ BINARY := go-cache-plugin PKG := github.com/tailscale/go-cache-plugin/cmd/go-cache-plugin DIST := dist UPSTREAM := $(shell go list -m -f '{{.Version}}' github.com/tailscale/go-cache-plugin) -GOFLAGS := -ldflags="-s -w" +LDFLAGS := -s -w OS ?= $(shell go env GOOS) ARCH ?= $(shell go env GOARCH) @@ -14,7 +14,7 @@ all: build # Static so the released binary runs on any image in the estate, Alpine included. build: - CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build $(GOFLAGS) -o $(DIST)/$(BINARY) $(PKG) + CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -ldflags="$(LDFLAGS)" -o $(DIST)/$(BINARY) $(PKG) # -count=1: the tests build via `make build`, and the Makefile is not a go test # cache input, so a cached PASS would outlive a broken build recipe.