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

Parse/Serialize with additional version numbers #34

Closed
apetrynet opened this issue Jan 10, 2014 · 4 comments
Closed

Parse/Serialize with additional version numbers #34

apetrynet opened this issue Jan 10, 2014 · 4 comments

Comments

@apetrynet
Copy link

Hi!

I'm trying to implement bumpversion in my workflow.
What I want bumped is the version number for a *.deb package. The problem is that deb versioning has the following syntax:

mypackage_0.0.10-storm0_amd64.deb

I have this cfg:

[bumpversion]
current_version = 0.0.10-storm0
serialize = {major}.{minor}.{patch}-storm{package}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)-storm(?P<package>\d+)
files = Makefile

And my Makefile to be bumped:

...
NAME = mypackage0
VERSION = 0.0.10-storm0
...

If I run the following command the package number (-storm0) part gets removed in both .bumpversion.cfg and Makefile.

bumpversion patch

But command line like this works:

bumpversion --parse '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)-storm(?P<package>\d+)' --serialize '{major}.{minor}.{patch}-storm{package}' patch

Is there something wrong with my config file or is this not possible to do?
Also, is there now or would it in the future be possible to bump the custom package number as well?

Thanks,
-Daniel

peritus added a commit that referenced this issue Jan 10, 2014
@peritus
Copy link
Owner

peritus commented Jan 10, 2014

Thank you for taking the time to write this bug report!

That was indeed a bug in bumpversion that I fixed in 47aed10 and that's now part of v0.3.8: Running pip install --upgrade bumpversion should get you there.

@peritus
Copy link
Owner

peritus commented Jan 10, 2014

Also, is there now or would it in the future be possible to bump the custom package number as well?

I don't quite understand you mean by "custom package number", can you elaborate ?

@apetrynet
Copy link
Author

Works like a charm!
This actually works with my additional package number too.

What I meant with "custom package number" is in my case was an additional version number linked to package version.

0.0.10-storm0
         ^

Thank you for you're time and great tool!
-Daniel

@peritus
Copy link
Owner

peritus commented Jan 10, 2014

Glad to hear that! Have fun using it!

@peritus peritus closed this as completed Jan 10, 2014
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

2 participants