File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ current_branch=$(git rev-parse --abbrev-ref HEAD)
1919if [ " $current_branch " = " next" ]; then
2020 bumpp --preid alpha --execute=" $generateChangeLog " --commit " $commitInfo " --all --tag --push
2121else
22- echo " 当前分支是:$current_branch ,版本迭代允许在next分之操作 ,并推送到远程!!!"
22+ echo " 当前分支是:$current_branch ,版本迭代允许在next分支操作 ,并推送到远程!!!"
2323fi
2424
2525
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # #
4+ # # 同步分支脚本
5+ # # 使用: ./scripts/sync
6+ # #
7+
8+
9+ # 远程仓库名称
10+ remoteList=(" origin" " mmdapl" " chufan443" " lir0115" )
11+ # 获取当前分支名称
12+ current_branch=$( git rev-parse --abbrev-ref HEAD)
13+
14+
15+ # 判断分支名称
16+ if [ " $current_branch " = " master" ]; then
17+
18+ # 合并next分支内容到master分之
19+ git merge origin/next
20+
21+ # 推送到每个远程仓库
22+ for repoName in " ${remoteList[@]} "
23+ do
24+ echo " Pushing to $repoName ..."
25+ git push " $repoName " master
26+ done
27+ else
28+ echo " 当前分支是:$current_branch ,只允许在master分支上操作,并推送到远程!!!"
29+ fi
You can’t perform that action at this time.
0 commit comments