-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
bump behavior different in command line and python API #79
Comments
Hi! This is intentional:
The CLI only exposes the latter. I could add a |
Hi!
Thanks for your quick reply!
I think the confusion on my side stems from "bumping" being something I
thought someone would do to a version, so once I found a bump method, I
stopped looking, assuming this is the way bumping works.
It required looking deep through the code to find that the cml bumps
through the serialize method, which I wasn't expecting.
I think a possible solution here is to add a boolean to the Version.bump
method in order to allow it to replicate the cml behavior.
Thanks,
Yishai
…On Thu, Mar 21, 2024, 14:35 Matthew Kennerly ***@***.***> wrote:
Hi! This is intentional:
- Version.bump() always bumps and lets you bump by more than 1. This
is for cases where you have custom logic/conditions and want more control.
- bump_version() is the same, but only for the base.
- Version.serialize(bump=True) only bumps when distance != 0 and only
bumps by 1. This is for streamlining the most common case.
The CLI only exposes the latter. I could add a --force-bump option if
there's interest, though.
—
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBURVN5RH5EKB2XQY5TTTDYZLHZVAVCNFSM6AAAAABFBE2X6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJSGE3TCMRQG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
mtkennerly
added a commit
that referenced
this issue
Apr 12, 2024
You can now do this in v1.20.0:
|
Great, thanks for the implementation! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using dunamai 1.19.2
Say I have a tag 1.3.0 in the current commit with a clean git. Running this:
produces '1.3.1' (desired: '1.3.0')
command line:
dunamai from any --pattern default-unprefixed --format "{base}" --bump
correctly produces 1.3.0Putting the bump inside serialize (emulating what the command line does) produces the correct 1.3.0.
The text was updated successfully, but these errors were encountered: