c4urself / bump2version

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

Do not modify config file if current_version key is missing #228

Closed starhel closed 2 years ago

starhel commented 3 years ago

I'm trying to use bump2version with setuptools_scm in simple configuration:

I don't need any commit for version release as whole pipeline is based on git tag and no information about version is stored in code. Without setup.cfg or .bumpversion.cfg everything works as expected. Unfortunately adding simple configuration for bump2version (or even setup.cfg without bump2version section) and creating new tag leaves the repository in dirty state.

Expected behavior From my point of view current_version in config file should be changed only if this key is present. Modifying config file (or setup.cfg without config for bump2version) is bad behavior and should be fixed (or at least new option should be added to config file to avoid breaking change).

florisla commented 3 years ago

Bump2version treats the version in the config file as the canonical, full version string.

Removing it leads to doubt about what is the 'authoritative source' of the version.

But we are considering this; see #185.

starhel commented 2 years ago

Thanks for clarification. I'll observe and comment that issue.