fix: 修复发布脚本确保添加 v 前缀
All checks were successful
Docker Build and Push / build-and-push (push) Successful in 2m28s

This commit is contained in:
D8D Developer
2026-03-20 07:07:06 +00:00
parent d49cce1c37
commit df81143d5c

View File

@@ -110,8 +110,12 @@ echo "🌿 当前分支: $CURRENT_BRANCH"
# 拉取最新代码
echo "📥 拉取最新代码..."
git pull gitea "$CURRENT_BRANCH"
# 自动添加 release/ 前缀(如果用户输入的是纯版本号)
# 自动添加 release/v 前缀(如果用户输入的是纯版本号)
if [[ ! $VERSION =~ ^release/ ]]; then
# 如果版本号没有 v 前缀,添加 v
if [[ ! $VERSION =~ ^v ]]; then
VERSION="v$VERSION"
fi
VERSION="release/$VERSION"
echo "📌 自动添加前缀,最终标签: $VERSION"
fi