Fix tag describe in makefile

This commit is contained in:
Wayback Archiver 2023-05-09 05:02:19 +00:00
parent d898e7a931
commit 830004735a
No known key found for this signature in database
GPG key ID: 57D14486138C9377

View file

@ -1,12 +1,13 @@
export GO ?= go export GO ?= go
TAG := $(shell git describe --always --tags $(git rev-list --tags --max-count=1) --match v*)
.PHONY: all .PHONY: all
all: wireproxy all: wireproxy
.PHONY: wireproxy .PHONY: wireproxy
wireproxy: wireproxy:
tag="$$(git describe --tag 2>/dev/null)" && \ ${GO} build -trimpath -ldflags "-s -w -X 'main.version=${TAG}'" ./cmd/wireproxy
${GO} build -ldflags "-X 'main.version=$$tag'" ./cmd/wireproxy
.PHONY: clean .PHONY: clean
clean: clean: