-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
607 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "repository is dirty" | ||
exit 1 | ||
fi | ||
|
||
if [ $(git symbolic-ref --short -q HEAD) != "main" ]; then | ||
echo "not on main branch" | ||
exit 2 | ||
fi | ||
|
||
# ensure main branch is up-to-date | ||
git pull | ||
|
||
# merge main into release branch | ||
git checkout release | ||
git merge --no-ff main --no-edit | ||
|
||
# bump patch version (e.g. from 0.1.3 to 0.1.4) | ||
poetry version patch | ||
|
||
# commit change | ||
git add pyproject.toml | ||
git commit -m "Bump version" | ||
|
||
# create tag and push | ||
new_tag=v$(poetry version -s) | ||
echo New tag: $new_tag | ||
git tag $new_tag | ||
git push origin release $new_tag | ||
|
||
# clean up | ||
git checkout main |
Oops, something went wrong.