c4urself / bump2version

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

Behavior if used with --current-version and --new-version #140

Closed 4hopp closed 3 years ago

4hopp commented 4 years ago

If bump2version is used with both --current-version and --new-version (or only --new-version, but the current version can be retrieved from the config file) it seems like the part argument is not used at all, though it is required. Is this assumption correct?

Example:

bump2version --current-version 2.0.0 --new-version 2.1.0 major

(My assumption is, that this would result in a minor bump, going from 2.0.0 to 2.1.0 and ignoring the argument major.)

If the part argument is used by bump2version in those cases in any way, then it should be clarified how part affects the result.

If it is not used, then the user should have the option to omit part. If they decide to use part however, then bump2version should check for consistency. (E.g. Is this really a major/minor/patch bump?)

florisla commented 3 years ago

You're right, part is not used at all, even though it is a required argument.

In many cases you can use a-non-existing-part as the part argument, and it will work just as well.

Issue #22 is tracking this.