c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.05k stars 135 forks source link

Logging from _tag_in_vcs is confusing when args.tag is False #236

Open mwchase opened 2 years ago

mwchase commented 2 years ago

I was checking that bump2version works as expected for my use case. Currently, I want to handle the tagging step myself. So, I'm running commands like bumpversion --dry-run --verbose major against the following config file:

[bumpversion]
current_version = 0.1.4
commit = True
tag = False

[bumpversion:file:src/motr/__init__.py]

The part of the output that tripped me up at first is Would tag 'v1.0.0' with message 'Bump version: 0.1.4 → 1.0.0' in Mercurial and not signing. This is... probably technically correct, but I find it kind of confusing in this case.

The relevant lines in the cli.py file are do_tag = args.tag and not args.dry_run and "Would tag" if not do_tag else "Tagging",. I'm not yet sure what phrasing I'd like to see, but I feel like the current phrasing doesn't communicate whether it hits "Would tag" because args.tag is False, args.dry_run is True, or both.

I guess what I'm wondering is whether there's value in emitting that log line at all when args.tag is False.

florisla commented 2 years ago

Agreed that it should not be printed if tagging is disabled.