Rename GOFLAGS make variable to LDFLAGS
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user