From 830004735a455ffd1056c62dcc459c057b32f995 Mon Sep 17 00:00:00 2001 From: Wayback Archiver <66856220+waybackarchiver@users.noreply.github.com> Date: Tue, 9 May 2023 05:02:19 +0000 Subject: [PATCH] Fix tag describe in makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8bc4c92..57004f1 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ export GO ?= go +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: