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

Specifying serialize in arguments does not affect other files #231

Open
ecs-jnguyen opened this issue Aug 20, 2021 · 0 comments
Open

Specifying serialize in arguments does not affect other files #231

ecs-jnguyen opened this issue Aug 20, 2021 · 0 comments
Labels

Comments

@ecs-jnguyen
Copy link

ecs-jnguyen commented Aug 20, 2021

Description

Hi I have a .bumpversion.cfg with [bumpversion:file:version.txt]. When I use the --serialize cli argument, it correctly writes back to the .bumpversion.cfg but version.txt is using the serialize configuration in the .bumpversion.cfg file.

How To Reproduce Example

Step 1 create .bumpversion.cfg and version.txt

.bumpversion.cfg

[bumpversion]
current_version = 0.8.0
serialize = {major}.{minor}
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?

[bumpversion:file:version.txt]

version.txt:

0.8.0

Run bump2version

$ bump2version patch --serialize "{major}.{minor}.{patch}" --list
current_version=0.8.0
serialize={major}.{minor}
parse=(?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?
new_version=0.8.1

Results

[bumpversion]
current_version = 0.8.1
serialize = {major}.{minor}
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))?

[bumpversion:file:version.txt]

version.txt:

0.8

Summary

After running bump2version with --serialize, we can see that version.txt is using the serialization config from the bumpversion.cfg with the value of 0.8. And we can also see that the version in .bumpversion.cfg is using the serialization from the cli with a value of 0.8.1.

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

No branches or pull requests

2 participants