Skip to content
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

Only the serialize part of a version is being stored in the updated files #252

Open
stmlange opened this issue Jun 22, 2022 · 0 comments
Open

Comments

@stmlange
Copy link

stmlange commented Jun 22, 2022

Hello,
thank you for this nice project!
I haven't found an issue that describes that problem I have encountered.
Essentially it seems that when I run bump2version with a specific version let's say bump2version --verbose --new-version 1.0.0-rc.4 patch the version will get updated properly in .bumpversion.cfg, however the version in relevant configured files (e.g. gradle.properties) will just end up to be the part that I would describe as "parsable" or "serializable" by the config.

From my perspective this is not what I would have expected.
Either bumpversion refuses to operate with the --new-version specified (since it's not parsable), or spits out a warning that the --new-version specified is not parsable, but ultimately will set the version in gradle.properties to what has been specified by the command-line arguments.

Example content of .bumpversion.cfg:

[bumpversion]
current_version = 0.9.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize = {major}.{minor}.{patch}
commit = True
message = Update release version from {current_version} to {new_version}

[bumpversion:file:gradle.properties]

and gradle.properties:

version=0.9.1

With bump2version --verbose --new-version 1.0.0-rc.4 patch the .bumpversion.cfg would have current_version = 1.0.0-rc.4 patch and the gradle.properties would indicate version=1.0.0

The easy workaround of course would be to use a parse-thing that accepts all various different versions listed on https://semver.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant