Skip to content

Commit fd5b75b

Browse files
pedro-psbdralley
authored andcommitted
Make release git push atomic
We want it to either succeed or fail without leftovers.
1 parent c7c42c4 commit fd5b75b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • templates/github/.github/workflows/scripts

templates/github/.github/workflows/scripts/release.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ towncrier build --yes --version "${NEW_VERSION}"
2424
bump-my-version bump release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty
2525
bump-my-version bump patch --commit
2626

27-
# Git push is not atomic. And we want this to fail if the branch could not be updated.
28-
git push origin "${BRANCH}"
29-
git push origin "${NEW_VERSION}"
27+
# Git push is not atomic by default!
28+
git push --atomic origin "${BRANCH}" "${NEW_VERSION}"

0 commit comments

Comments
 (0)