-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new-version value is not used for other files than .bumpversion.cfg #60
Comments
.. that is, if you don't use Could you try using the new files config syntax introduced in
and adding as a separate section
and see whether the result is different (see README for details) ? |
Sounds like a bug in bumpversion to me, even if only when importing pre-0.5 config files. |
do you still want me to try what you suggested ? |
Using the new syntax could be a workaround that might work for you until I have a regression test at hand / released a fix if I can verify the defect. |
Not better with the new syntax. the part is applied to the file while the new-version value is only applied to .bumpversion.cfg |
@peritus Can you label this issue as bug ? |
Yes it's a bug ;) |
Thanks |
Has this been fixed yet? I'm running into this problem with v0.5.1. [bumpversion]
current_version = 0.8.0
[bumpversion:file:project/__init__.py] # project/__init__.py
__version__ = "0.8.0" $ bumpversion patch --allow-dirty --verbose --new-version 0.9.0
# Reading config file .bumpversion.cfg:
# [bumpversion]
# current_version = 0.8.0
#
# [bumpversion:file:project/__init__.py]
#
#
# Parsing version '0.8.0' using regexp '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'
# Parsed the following values: major=0, minor=8, patch=0
# Attempting to increment part 'patch'
# Values are now: major=0, minor=8, patch=1
# New version will be '0.9.0'
# Asserting files project/__init__.py contain the version string:
# Found '0.8.0' in project/__init__.py at line 0: __version__ = "0.8.0"
# Changing file project/__init__.py:
# --- a/project/__init__.py
# +++ b/project/__init__.py
# @@ -1,3 +1,3 @@
# -__version__ = "0.8.0"
# +__version__ = "0.8.1"
# Writing to config file .bumpversion.cfg:
# [bumpversion]
# current_version = 0.9.0
#
# [bumpversion:file:project/__init__.py]
#
#
# Would prepare Git commit
# Would prepare Git commit
# Would add changes in file 'project/__init__.py' to Git
# Would add changes in file '.bumpversion.cfg' to Git
# Would commit to Git with message 'Bump version: 0.8.0 → 0.9.0'
# Would tag 'v0.9.0' in Git |
@petebrowne the PR is still opened, so I guess it's still pending |
This has not been fixed yet, willing to merge patches including tests and docs (ok, well, one regression test exists already). Sent from my pocket calculator
|
Conflicts: tests.py
Assumes that if you pass --new-version, you want to override all other version bumping.
Assumes that if you pass --new-version, you want to override all other version bumping.
Awesome! When will this be released to pypi? |
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 :
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 :
The text was updated successfully, but these errors were encountered: