question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to create lightweight git tags with bumpversion.cfg configuration

See original GitHub issue

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.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:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
vEpiphytecommented, Jul 16, 2020

@ekohl Yes I can!

0reactions
ekohlcommented, Apr 6, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

devops Archives - Rule of Tech
In this blog post I will concentrate on using Renovate and integrate it with GitLab CI. Renovate your dependencies. Renovate is open source...
Read more >
git describe --tags is not reporting the correct tag
Does anyone have any idea how this is occurred and how I may be able to resolve it so the tag is also...
Read more >
bump2version Changelog - PyUp.io
Fix bug where `--new-version` value was not used when config was present (thanks cscetbon ecordell [60](https://github.com/peritus/bumpversion/pull/60)
Read more >
Using Git Tags To Version Coding Tutorials | by Emma Bostian
Creating A Tag. You can create two types of tags: lightweight and annotated. Lightweight Tags. A lightweight tag is similar to a branch;...
Read more >
The Buildroot user manual
Why are some packages not visible in the Buildroot config menu? ... present except the device files in /dev/ (Buildroot can't create them...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found