lockbox

password manager
Log | Files | Refs | README | LICENSE

commit dd1181ff00af41c74f04ca36828eb542bd4a09a1
parent a95128b42b5162230983dd563cd5aa4b7d5ece35
Author: Sean Enck <sean@ttypty.com>
Date:   Wed, 24 Apr 2024 22:55:56 +0000

support ldflags

Diffstat:
MMakefile | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -5,6 +5,7 @@ VERSION ?= $(shell git log -n 1 --format=%h) VARS := LOCKBOX_ENV=none DESTDIR := /usr/local/bin GOFLAGS := -trimpath -buildmode=pie -mod=readonly -modcacherw -buildvcs=false +LDFLAGS := GOOS := GOARCH := @@ -16,7 +17,7 @@ $(TARGET): cmd/main.go internal/**/*.go go.* internal/app/doc/* ifeq ($(VERSION),) $(error version not set) endif - GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(GOFLAGS) -ldflags "-X main.version=$(VERSION)" -o $@ cmd/main.go + GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(GOFLAGS) -ldflags "$(LDFLAGS) -X main.version=$(VERSION)" -o $@ cmd/main.go unittests: $(VARS) go test ./...