Skip to content

Commit

Permalink
chore: fix cog patch release automation oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Jun 16, 2023
1 parent 0a513df commit df4cd51
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions cells/_automation/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,32 @@ in {
branch_whitelist = ["main" "release/**"];
ignore_merge_commits = true;
pre_bump_hooks = [
''git switch -c "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" || git switch "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" && git merge main''
"echo {{version}} > ./VERSION"
''
branch="$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"
if [ `git rev-parse --verify $branch 2>/dev/null` ]
then
git switch -m "$branch" || exit 1
git merge main
else
git switch -c "$branch" || exit 1
fi
''
];
post_bump_hooks = [
''git push --set-upstream origin "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"''
"git push origin v{{version}}"
''
branch="$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"
git push --set-upstream origin "$branch"
git push origin v{{version}}
git switch main
git merge "$branch" --no-commit --no-ff
echo {{version+minor-dev}} > ./VERSION
git add VERSION
git commit -m "chore: sync with release"
git push origin main
''
"cog -q changelog --at v{{version}}"
"git switch main"
''git checkout "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')" -- ./VERSION''
''git merge "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"''
"git push"
"echo {{version+minor-dev}} > ./VERSION"
"git add VERSION"
];
changelog = {
path = "CHANGELOG.md";
Expand Down

0 comments on commit df4cd51

Please sign in to comment.