A CLI utility extension of bump2version that will push release tag to git remote in same flow.
pip install bump2release
- Merge all feature branches to release branch. Either by pull request on remote, or local merge.
- Run bump2Release (alias b2r), passing SEMVER release type (Major/Minor/Patch), and message for annotated tag
CLI Usage:
usage: bump2release [-h] bump_type tag_message
positional arguments:
bump_type Major / Minor / Patch etc.
tag_message annotated tag message
optional arguments:
-h, --help show this help message and exit
Sample Command
bump2release minor "new feature added"
- Validate that git staging isn't dirty
- Validate that script is running from main/master/dev branch
- Pull latest changes from upstream (if feature branch was just merged)
- Leverage bump2version to bump version files, commit the change, and create matching annotated tag
- Push newly created tag to git remote (which can kick off a publish CI action)
- A
version.txt
file is required - Additional files can optionally be specified in .bumpversion.cfg
Free Software: MIT License