-
-
Notifications
You must be signed in to change notification settings - Fork 286
feat(bump): support prereleases with a start offset #614
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(bump): support prereleases with a start offset #614
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.
Hi @ckagerer , thanks for your contribution and sorry for taking so long. The code looks good to me 🙌 But we might need your help to add some documentation and rebase the latest changes from the master branch.
Hi @Lee-W, I have rebased the latest master branch to my feature branch. Where do you expect the documentation to be? Best regards |
Hi @ckagerer thanks for the prompt update. I think we'll need to add the usage in https://github.com/commitizen-tools/commitizen/blob/master/docs/bump.md so that users know how to use |
@Lee-W I have already extended the documentation in config.md. Should I also include a command line argument, or is it enough just to use the configuration? |
@ckagerer It would be better if you could add the command line argument. Also, I notice we'll have to update the output of |
@Lee-W |
Hi @ckagerer it looks great! I think our last step is to taking care of the CI failure. |
Hey @Lee-W Oh yes, I have ignored this so far because one of the unit tests fails locally on the master. It seems to go wrong when installing with pip. Any experience with this? I can try a poetry update to see if that helps. |
No, there are no updates at all. |
Codecov ReportBase: 97.92% // Head: 98.03% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #614 +/- ##
==========================================
+ Coverage 97.92% 98.03% +0.11%
==========================================
Files 35 39 +4
Lines 1252 1682 +430
==========================================
+ Hits 1226 1649 +423
- Misses 26 33 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Do you have the error message? |
I think I read the message completely wrong :) I ran the format script again and it was one line short. Now it should fit :) |
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.
In special cases, it may be necessary for prereleases not to start with a 0, because the individual characters are encoded in bytes. Here, a 0 in the byte is interpreted as a release version, consistent with the location of bugfixes. Therefore, this commit introduces a generic option to change the start of the prerelease to accommodate such circumstances. EXAMPLES Before: 0.3.0 -> PATCH beta-> 0.3.1b0 Now (with offset 0 == default) 0.3.0 -> PATCH beta-> 0.3.1b0 Now (with offset 1) 0.3.0 -> PATCH beta-> 0.3.1b1
This PR solves #613
For special cases it may be necessary that prereleases cannot start with a 0, because the single characters are encoded in bytes. Here, consistent with the location for bugfixes, a 0 in the byte is interpreted as a release version. Therefore this commit introduces a generic option to change the start of the prerelease and also adapt it to such circumstances.
EXAMPLES
Previously:
0.3.0 -> PATCH beta-> 0.3.1b0
Now (with offset 0 == default):
0.3.0 -> PATCH beta-> 0.3.1b0
Now (with offset 1):
0.3.0 -> PATCH beta-> 0.3.1b1
Description
Checklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
Steps to Test This Pull Request
Additional context