-
-
Notifications
You must be signed in to change notification settings - Fork 312
feat(version): add MANUAL_VERSION, --next and --patch to version command #1724
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(version): add MANUAL_VERSION, --next and --patch to version command #1724
Conversation
bearomorphism
commented
Dec 12, 2025
@Lee-W I already ran pytest tests/commands/test_version_command.py -n auto --regen-all to regenerate the test files, but the pipeline still fails. (The tests passed on my machine)
Do you have any ideas why this happen
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 realize now that this creates problems with the (not)monotonic kind of versions (and possible non-semver). I'm not sure what to do about it.
I think for now it's fine that if you diverge too much from semver in your custom version scheme, then you won't get the full range of features.
woile
commented
Dec 12, 2025
There was a way to run all the pre-commits, but I don't remember how it works 😅
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 about having a parametrize of the combinations that should fail:
@pytest.mark.parametrize( "args", [ # incomplete list: {"next"}, # ... {"--verbose", "next"} ] )
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.
Sounds good.
woile
commented
Dec 12, 2025
Nice to see this going forward 🎉
54159ff to
34fb773
Compare
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.92%. Comparing base (193859b) to head (4a9a5da).
Additional details and impacted files
@@ Coverage Diff @@ ## master #1724 +/- ## ========================================== - Coverage 97.93% 97.92% -0.01% ========================================== Files 60 61 +1 Lines 2611 2654 +43 ========================================== + Hits 2557 2599 +42 - Misses 54 55 +1
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
bearomorphism
commented
Dec 13, 2025
bearomorphism
commented
Dec 13, 2025
I will rebase this branch after #1726 is merged. The test failure should be resolved then.
8d938d2 to
f9afbd4
Compare
f9afbd4 to
094f48b
Compare
3b48a33 to
b07121e
Compare
@noirbizarre
noirbizarre
left a comment
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.
That's an interesting feature, one that I would totally use!
Also, I never realized that the version command was doing totally different things depending on the flags 😅
So maybe it's the occasion to have a dedicated --version flag and have the version command focusing on the the project versioning and not the Commitizen version. It would be cleaner, easier to understand and more standard. WDYT ?
Note
I would not remove the Type aliases as it makes the PR bigger than it should and it introduce a breaking change (and reading the PR and issues, we know that it has been used by some users for some custom version schemes).
noirbizarre
commented
Jan 5, 2026
bearomorphism
commented
Jan 5, 2026
Also, the enumn part seems to overlap with #1518, so maybe #1518 should go first so this PR can reuse the Increment enum
I would prefer to merge this before #1518 because it is a bit larger than this PR.
So maybe it's the occasion to have a dedicated --version flag and have the version command focusing on the the project versioning and not the Commitizen version. It would be cleaner, easier to understand and more standard. WDYT ?
+1. As a user, I often run cz --version and end up seeing an error. We can create another work item about adding the dedicated flag and then deprecate cz version --commitizen and other removable flags in the next major version.
b07121e to
044416d
Compare
575468d to
3af1a57
Compare
4b6a441 to
c3d27c9
Compare
c3d27c9 to
cd857d8
Compare
bearomorphism
commented
Jan 12, 2026
@woile @noirbizarre @Lee-W
Could you review and merge this PR, so we can move on to other cz version related task? Thanks!
woile
commented
Jan 12, 2026
There are some open conversations still
cd857d8 to
5502285
Compare
5502285 to
4a9a5da
Compare
Uh oh!
There was an error while loading. Please reload this page.
Closes #1679
Manually tested and added test cases, the result LGTM.