修改 Makefile 中的 VERSION 值为从 git tag 中读取,即读取最新的 git tag 值,规则为 20251129.1、20251129.2

This commit is contained in:
Table 2025-11-29 04:39:00 +08:00
parent d593fce014
commit 46e3a7b2c0

View File

@ -2,7 +2,7 @@
# 变量定义 # 变量定义
APP_NAME := yinli-api APP_NAME := yinli-api
VERSION := 1.0.0 VERSION := $(shell git tag --sort=-version:refname | head -n 1 2>/dev/null || echo "1.0.0")
BUILD_DIR := build BUILD_DIR := build
DOCKER_DIR := docker DOCKER_DIR := docker
DOC_DIR := doc DOC_DIR := doc