-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Use special version bumping rules for versions that start with 0.x (closes #37) #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. So when the first number is 0, you treat minor as major, and patch as minor, and there is no patch, effectively
Right, that tends to be how most projects seem to handle it. Technically with semantic versioning any 0.x.x version can contain breaking changes. However, most projects seem to track breaking changes by incrementing the minor number so there's still some indication. Then patch and minor get squashed into one component, effectively. |
src/semver.rs
Outdated
@@ -53,6 +54,13 @@ impl Version { | |||
}), | |||
} | |||
} | |||
|
|||
/// Is the current version's major component 0? If so, rules are applied differently in `bump`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are thoughts on moving this comment to bump
since it seems to be describing the behavior of bump
and not is_0
? It's possible we might use this in more than bump
in the future.
Similarly, if bump
is updated in the future (name change, does not use is_0
, removed, etc.), the comment will no longer be valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I won't hold the PR up over this comment, but I do think it's worth considering)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added more detail to the documentation both to address your concern and answer Ben's question in code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really loving the emphasis on testing. Great job 👍
Required to use the auto-bumping feature of Dobby from conventional commits for a good chunk of our projects which are still 0.x (including Dobby!)