Unable to create lightweight git tags with bumpversion.cfg configuration
See original GitHub issueHello bump2version team,
The default behavior of a call like bump2version --verbose patch
is to create an annotated tag, using the default text provided through argparse.If bump2version --verbose --tag-message='' patch
is called, then things work as expected. I cannot figure out how to make lightweight git tags with bump2version when using bumpversion.cfg to manage the version configuration. All values set to the tag_message value are interpreted as the string of the value, so even with the configuration like the following an annotated commit is created
[bumpversion]
current_version = 2.0.1
commit = True
tag = True
tag_message = ""
from dry-run output…
Would prepare Git commit
Would add changes in file 'setup.py' to Git
Would add changes in file '.bumpversion.cfg' to Git
Would commit to Git with message 'Bump version: 2.0.1 → 2.0.2'
Would tag 'v2.0.2' with message '""' in Git and not signing
I am managed dozens of projects across multiple maintainers, and need their processes to be driven by configuration files. Requiring maintainers to remember a command line flag for a simple version bump is non-ideal. An incorrect tag can cause issues with downstream processes not executing (see https://discuss.circleci.com/t/checkout-fails-on-workflow-triggered-by-annotated-git-tag/27272 ) so having this feature supported by configuration files is important to reduce the risk of error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
@ekohl Yes I can!
IMHO projects doing releases should always use annotated tags so
git describe
works without having to passgit describe --all
. That means the documentation should reflect the current behavior. In fact, the whole reason this project initially forkedbumpversion
was to create annotated tags.