Closed vEpiphyte closed 3 years ago
tag_message = ""
The quotes are not being interpreted but taken literally as can be seen here:
Would tag 'v2.0.2' with message '""' in Git and not signing
I think you need to use tag_message =
instead
@ekohl Thanks - that works with bump2version
for me. Would be worth noting that in the docs since it was non-trivial to sort that config out.
Would you be willing to submit a PR for that?
@ekohl Yes I can!
I stumbled on this today...
In fact, I would expect the default behavior to create non-annotated tags as explained by the docs.
What is the consensus ? Should the documentation reflect the current behaviour (create annotated tags by default) or should the default behaviour be changed (to create lightweight tags) ?
IMHO projects doing releases should always use annotated tags so git describe
works without having to pass git describe --all
. That means the documentation should reflect the current behavior. In fact, the whole reason this project initially forked bumpversion
was to create annotated tags.
Hello 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.Ifbump2version --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 createdfrom dry-run output..
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.