File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 1414 branch_whitelist = [ "main" "release/**" ] ;
1515 ignore_merge_commits = true ;
1616 pre_bump_hooks = [
17- ''git switch -c "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" || git switch "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" && git merge main''
1817 "echo {{version}} > ./VERSION"
18+ ''
19+ branch="$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"
20+ if [ `git rev-parse --verify $branch 2>/dev/null` ]
21+ then
22+ git switch -m "$branch" || exit 1
23+ git merge main
24+ else
25+ git switch -c "$branch" || exit 1
26+ fi
27+ ''
1928 ] ;
2029 post_bump_hooks = [
21- ''git push --set-upstream origin "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"''
22- "git push origin v{{version}}"
30+ ''
31+ branch="$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"
32+ git push --set-upstream origin "$branch"
33+ git push origin v{{version}}
34+
35+ git switch main
36+ git merge "$branch" --no-commit --no-ff
37+ echo {{version+minor-dev}} > ./VERSION
38+ git add VERSION
39+ git commit -m "chore: sync with release"
40+ git push origin main
41+ ''
2342 "cog -q changelog --at v{{version}}"
24- "git switch main"
25- ''git checkout "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" -- ./VERSION''
26- ''git merge "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"''
27- "git push"
28- "echo {{version+minor-dev}} > ./VERSION"
29- "git add VERSION"
3043 ] ;
3144 changelog = {
3245 path = "CHANGELOG.md" ;
You can’t perform that action at this time.
0 commit comments