fix(build):修复测试环境打包后的版本检测问题

This commit is contained in:
qian committed 2026-08-03 22:45:50 +08:00
1 parent b10352ec1d
commit 66f857a26b
2 files changed
+22 -8

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
ROOT_DIR = $(CURDIR)
DEPLOY_NAME = "team-api"
DOCKER_NAME = "team-api"
VERSION ?= $(shell git describe --tags --long 2>/dev/null | sed -E 's/-0-g[0-9a-f]+$$//; s/-([0-9]+)-g[0-9a-f]+$$/_\1/' || cat VERSION 2>/dev/null || echo "dev")
VERSION ?= $(shell git describe --tags --long 2>/dev/null | sed -E 's/-0-g[0-9a-f]+$$//; s/-([0-9]+)-g[0-9a-f]+$$/+\1/' || cat VERSION 2>/dev/null || echo "dev")
LDFLAGS = -X github.com/qianfree/team-api/internal/consts.Version=$(VERSION)
# Mirror acceleration (override for non-China regions)