mirror of
https://github.com/wader/fq.git
synced 2024-11-25 23:13:19 +03:00
make: Move build flags to vars
This commit is contained in:
parent
ac106d9ca5
commit
b0694f55cd
5
Makefile
5
Makefile
@ -1,9 +1,12 @@
|
||||
GO_BUILD_FLAGS=-trimpath
|
||||
GO_BUILD_LDFLAGS=-s -w
|
||||
|
||||
all: test fq
|
||||
|
||||
.PHONY: fq
|
||||
fq: VERSION=$(shell git describe --all --long --dirty 2>/dev/null || echo nogit)
|
||||
fq:
|
||||
CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION}" -trimpath -o fq .
|
||||
CGO_ENABLED=0 go build -o fq -ldflags "${GO_BUILD_LDFLAGS} -X main.version=${VERSION}" "${GO_BUILD_FLAGS}" .
|
||||
|
||||
.PHONY: test
|
||||
test: testgo testjq testcli
|
||||
|
Loading…
Reference in New Issue
Block a user