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

bumpversion w/ added "commit" part adding additional parts to files #215

Open
connormason opened this issue Nov 6, 2021 · 0 comments
Open

Comments

@connormason
Copy link

Hi all, it's very likely what I'm seeing is user error, but I'm having trouble figuring out how exactly to get the result that I'm looking for. Really all I want to do is add an addition part to the end of a typical semvar versioning scheme to correlate to commit number after the last version bump. I plan to have this automatically get bumped in our repo CI. Here's what my config looks like:

[bumpversion]
current_version = 1.3.8.0
commit = False
message = [skip-ci] Bump version: {current_version} → {new_version}
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<commit>\d+))?
serialize = 
	{major}.{minor}.{patch}.{commit}
	{major}.{minor}.{patch}

[bumpversion:part:commit]

[bumpversion:file:repo/version.py]

[bumpversion:file:setup.py]

What I'm seeing is that when I run bumpversion commit with this config, the current_version in my config file is updated as I expect to 1.3.8.1. But in the other configured files (setup.py and repo/version.py), the version is being changed to 1.3.8.1.0. I tried adding the parse/serialize keys to the individual file configs, but I get the same result. Any idea what is going on here?

Thank you in advance!

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