Merge branch 'develop_sky_liyi' into 'develop_sky'

fix:增加生成tag版本号时移除Merge和Revert操作对版本号进行递增的逻辑,增加对commit id 的去重

See merge request StarlockTeam/app-starlock!132
This commit is contained in:
李仪 2025-06-03 01:54:08 +00:00
commit c229356547

View File

@ -69,17 +69,17 @@ else
echo "compare_json:$compare_json\n"
new_patch=$patch
new_minor=$minor
declare -A seen_commits # 用于去重
seen_commits="" # 用于去重
while IFS= read -r commit_json; do
commit_id=$(echo "$commit_json" | jq -r '.id')
commit_title=$(echo "$commit_json" | jq -r '.title')
commit_message=$(echo "$commit_json" | jq -r '.message')
# commit id 去重
if [[ -n "${seen_commits[$commit_id]}" ]]; then
# commit id 去重(兼容所有 shell
if echo "$seen_commits" | grep -q "$commit_id"; then
continue
fi
seen_commits[$commit_id]=1
seen_commits="$seen_commits $commit_id"
# 跳过 Merge 和 Revert 提交
if [[ "$commit_title" =~ ^Merge ]] || [[ "$commit_title" =~ ^Revert ]]; then