fix: resolve build version from release tag

This commit is contained in:
JRBaggins
2026-07-01 14:25:46 +08:00
parent 3812e627a8
commit de64b02612
10 changed files with 49 additions and 13 deletions
+2 -1
View File
@@ -15,7 +15,8 @@ RUN go mod download
COPY . .
# 构建应用
RUN go build -o main ./cmd/server/
RUN VERSION_VALUE="$(./scripts/resolve-version.sh)" && \
go build -ldflags="-s -w -X main.Version=${VERSION_VALUE}" -o main ./cmd/server/
# 暴露端口
EXPOSE 8080