-
Notifications
You must be signed in to change notification settings - Fork 134
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
Expose major/minor/patch and custom parts in all configurable strings #41
Conversation
@c4urself How do you feel about this one? If it has no chance to be merged in, I should stop using it here ;-) |
@florisla -- I like it, haven't had a need for it myself but definitely see why some others might. Can we add a test for the replace functionality you were planning on using it for? |
It seems the tests (edit: i.e., all |
If I understood correctly this will allow us to handle cases like
which after bumping minor version becomes
? |
If you have a special bumpversion configuration file to track the cmake version, yes. You can use the parts (major/minor/patch or custom) independently everywhere you like. So you could also create a commit message like
|
29b6f90
to
96072cc
Compare
I've just rebased on #46 so the unit tests now use 'vcs' as a fixture. |
96072cc
to
61c2304
Compare
Rebased on master. Let me know if you'd like to see other changes. |
In search/replace, always use current_[part] or new_[part]. See discussion at c4urself#41 (comment) Does not affect pytest tests.
33cdd13
to
9dbbaef
Compare
Rebased on master. |
9dbbaef
to
6fcf481
Compare
I've rebased on master and updated the Readme to reflect the changes (+ some cosmetic fixes). |
@c4urself - any chance this can be merged? :) |
Currently, only 'serialize' has access to the 'part' identifiers such as {major}, {minor} and {patch}. This change exposes them also to other configurable strings, providing more flexibility in formatting: message tag_name tag_message replace To be intuitive relative to the existing 'current_version' and 'new_version' identifiers, these are named 'current_[part]' and 'new_[part]'.
6fcf481
to
535da18
Compare
Closes #35
Currently, only
serialize
has access to thepart
identifiers suchas
{major}
,{minor}
and{patch}
.This change exposes them also to other configurable strings, providing
more flexibility in formatting:
To be intuitive relative to the existing
current_version
and
new_version
identifiers, these are namedcurrent_[part]
and
new_[part]
.Additionally, to be intuitive relative to the
[part]
identifiersavailable in
serialize
, thenew_[part]
identifiers are alsoexposed as
[part]
without thenew_
prefix.