git-cliff --bump increments major when breaking changes, even when the major is currently zero
jcgruenhage opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Description of the bug
https://semver.org/#spec-item-4 indicates that breaking changes are fair game as long as the major is zero. I have the following in a post-commit hook:
#!/bin/bash
git cliff --bump > CHANGELOG.md
if ! git diff --quiet -- CHANGELOG.md; then
git commit --amend --no-edit --quiet CHANGELOG.md
fi
That usually does the right thing. I now have a breaking change though, which makes git-cliff bump the major version. This is not what I want to happen.
Steps To Reproduce
- Have a version 0.1.0
- Make a breaking change adding a feature
- Get 1.0.0
Expected behavior
I want the result to be 0.2.0, not 1.0.0
Screenshots / Logs
No response
Software information
- Operating system: Chimera Linux
- Rust version: Was probably built with 1.77.2
- Project version: git-cliff 2.2.1
Additional context
No response
Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️
c.f. #447. I think there was another issue about 0ver / zero based versioning rules as well at some point.
This actually looks like exactly what I want. Let me try this out tomorrow, if it works like understand it, then I'll close this
Yep, works as expected