From 34f3ce969b0f3c71f2e914a098289a5a8fdbe864 Mon Sep 17 00:00:00 2001 From: "142vip.cn" Date: Wed, 25 Oct 2023 22:31:02 +0800 Subject: [PATCH] =?UTF-8?q?chore(CHANGELOG):=20=E8=A7=84=E8=8C=83=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=BF=AD=E4=BB=A3=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/release | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/release b/scripts/release index e23dbf8..80fb8b7 100755 --- a/scripts/release +++ b/scripts/release @@ -12,4 +12,16 @@ readonly generateChangeLog='commit-and-tag-version && git add CHANGELOG.md' readonly commitInfo='chore(release): publish v%s' -bumpp --preid alpha --execute="$generateChangeLog" --commit "$commitInfo" --all --tag --push \ No newline at end of file +# 获取当前分支名称 +current_branch=$(git rev-parse --abbrev-ref HEAD) + +# 判断分支名称 +if [ "$current_branch" = "next" ]; then + bumpp --preid alpha --execute="$generateChangeLog" --commit "$commitInfo" --all --tag --push +else + echo "当前分支是:$current_branch ,版本迭代允许在next分之操作,并推送到远程!!!" +fi + + +## 直接快速生成CHANGELOG文档 +#pnpm commit-and-tag-version \ No newline at end of file