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

add 'bump_complete_version' which allows bumping revisions as well #38

Merged
merged 1 commit into from
Feb 17, 2022
Merged

add 'bump_complete_version' which allows bumping revisions as well #38

merged 1 commit into from
Feb 17, 2022

Conversation

marnikow
Copy link
Contributor

I wanted to use dunamai in my next project but missed some features. Cause I didn't want to overload one pull request I've split each feature into their own pull request.

In this pull request I propose to add a function that allow bumping revisions as well.

@mtkennerly
Copy link
Owner

Thanks for the PR and for splitting it up :)

You can currently do this with version.serialize(bump=True), which does bump the revision if it's set, along with some other handling. Does that satisfy your use case?

@mtkennerly mtkennerly added the enhancement New feature or request label Jan 27, 2022
@marnikow
Copy link
Contributor Author

Bumping a version without having to serialise it would stil be a plus for me.

@mtkennerly
Copy link
Owner

Hmm, I'm not necessarily opposed to adding a bump() method to the Version class, but I'm still a bit unclear on the use case. At the point where you would call serialize(), is the code no longer aware of the need to bump? When do you need to bump without serializing?

@marnikow
Copy link
Contributor Author

I can't come up with a use case but would still find it a puls if there would be a bump function that also bumps the revision next to the normal bump function

@marnikow
Copy link
Contributor Author

Hi Matthew

Do you have a timeline when you would release the new features as a new version?

Thanks in advance

@mtkennerly
Copy link
Owner

@marnikow Sorry about the delay! I'll finish looking over your PRs and getting a release out this week.

@mtkennerly
Copy link
Owner

I just thought of a use case: Version.serialize() doesn't let you specify the index to bump, so you could use this new function first to accomplish that. Technically, the bump argument could be overloaded to take an int, but I don't really like that, and it'd get messy if there were more arguments in the future. I'm happy to add this to support that use case - I'll just turn it into a method after the merge. Thanks!

@mtkennerly mtkennerly merged commit d706669 into mtkennerly:master Feb 17, 2022
@mtkennerly mtkennerly added this to the v1.9.0 milestone Feb 17, 2022
@marnikow marnikow deleted the bump_version branch February 18, 2022 22:54
@marnikow
Copy link
Contributor Author

Thanks for the work!

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

Successfully merging this pull request may close these issues.

None yet

2 participants