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

feat: Use special version bumping rules for versions that start with 0.x (closes #37) #65

Merged
merged 2 commits into from
Feb 12, 2021

Conversation

dbanty
Copy link
Member

@dbanty dbanty commented Feb 12, 2021

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!)

@dbanty dbanty requested review from sweetb, Shadow53 and a user February 12, 2021 17:30
Copy link

@sweetb sweetb left a 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

@dbanty
Copy link
Member Author

dbanty commented Feb 12, 2021

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`.
Copy link

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.

Copy link

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)

Copy link
Member Author

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.

Copy link

@ghost ghost left a 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 👍

@dbanty dbanty merged commit fb7f3a8 into main Feb 12, 2021
@dbanty dbanty deleted the 37-special-handling-of-0.x-versions branch February 12, 2021 18:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants