Skip to content

new-version value is not used for other files than .bumpversion.cfg #60

Description

@cscetbon

Hey,

I'm trying to use new-version to set a custom version but while it's correctly changed in the .bumpversion.cfg, it's not in the file added to the "files" list :

bumpversion patch --allow-dirty --dry-run --verbose --new-version 0.9.3

I can't understand why the part is mandatory when we provide a custom version for the package, but in my case, the part is used to increment the version in the file while the version in .bumpversion.cfg is set to the 0.9.3
I would expect to have versions set to 0.9.3 everywhere

Here is the output of the dry-run :

Reading config file .bumpversion.cfg:
[bumpversion]
current_version = 0.7.2
files = myp/__init__.py
message = v{new_version}
tag_name = {new_version}
tag = true
commit = true

Parsing version '0.7.2' using regexp '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'
Parsed the following values: major=0, minor=7, patch=2
Attempting to increment part 'patch'
Values are now: major=0, minor=7, patch=3
Dry run active, won't touch any files.
New version will be '0.9.3'
Asserting files myp/__init__.py contain the version string:
Found '0.7.2' in myp/__init__.py at line 0: __version__ = '0.7.2'
Would change file myp/__init__.py:
--- a/myp/__init__.py
+++ b/myp/__init__.py
@@ -1,4 +1,4 @@
-__version__ = '0.7.2'
+__version__ = '0.7.3'

 try:
     from myp.mapping import Digest
Would write to config file .bumpversion.cfg:
[bumpversion]
current_version = 0.9.3
files = myp/__init__.py
message = v{new_version}
tag_name = {new_version}
tag = true
commit = true

Would prepare Git commit
Would add changes in file 'myp/__init__.py' to Git
Would add changes in file '.bumpversion.cfg' to Git
Would commit to Git with message 'v0.9.3'
Would tag '0.9.3' in Git

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions