Fix tag describe in makefile (#65)
* Fix tag describe in makefile * Use build directive from makefile
This commit is contained in:
6
Makefile
6
Makefile
@@ -1,12 +1,14 @@
|
||||
export GO ?= go
|
||||
export CGO_ENABLED = 0
|
||||
|
||||
TAG := $(shell git describe --always --tags $(git rev-list --tags --max-count=1) --match v*)
|
||||
|
||||
.PHONY: all
|
||||
all: wireproxy
|
||||
|
||||
.PHONY: wireproxy
|
||||
wireproxy:
|
||||
tag="$$(git describe --tag 2>/dev/null)" && \
|
||||
${GO} build -ldflags "-X 'main.version=$$tag'" ./cmd/wireproxy
|
||||
${GO} build -trimpath -ldflags "-s -w -X 'main.version=${TAG}'" ./cmd/wireproxy
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user