File tree 1 file changed +22
-9
lines changed
1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 14
14
branch_whitelist = [ "main" "release/**" ] ;
15
15
ignore_merge_commits = true ;
16
16
pre_bump_hooks = [
17
- ''git switch -c "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" || git switch "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" && git merge main''
18
17
"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
+ ''
19
28
] ;
20
29
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
+ ''
23
42
"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"
30
43
] ;
31
44
changelog = {
32
45
path = "CHANGELOG.md" ;
You can’t perform that action at this time.
0 commit comments