Rename GOFLAGS make variable to LDFLAGS
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful

This commit is contained in:
2026-09-26 22:22:33 +10:00
parent 6a1db8d209
commit d288f225ee
+2 -2
View File
@@ -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.