-
-
Notifications
You must be signed in to change notification settings - Fork 278
[feature] add CalVer support #173
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
Comments
This is a tough one, I've read the document https://calver.org/ and it's still not clear how to do it. It also point out:
which makes it hard to extract a convention, if it's gonna be tailored to each team. But it would be a fun experiment to see if commitizen can be flexible enough to support different versioning schemas. |
This is actually one of the feature requests from Remote Python Pizza attendee 😆 This could be the next one we can play with after changelog. |
I think that was my feature request 👋 . I was just checking whether I actually created it here or not, and it seems @Lee-W was faster than me. I hope I can get to know the codebase fast enough to help implement the feature. 😊 |
I was thinking about this and there might be a straightforward way to handle all of the edge cases for how someone might want to format CalVer using only Lines 235 to 238 in ba94e3f
Could be: t = Template(tag_format)
t_ver = t.safe_substitute(
version=version, major=major, minor=minor, patch=patch, prerelease=prerelease
)
return datetime.utcnow().strftime(t_ver) As an example Other schemes from projects on https://calver.org/
If that sounds OK, I can submit a PR? Or feel free to handle it because it would be such a small change (Update 03Sep2021: added more example formats) |
Sounds interesting! More than welcome to submit a PR! Thanks! |
Just following up. I implemented the changes, added tests, and updated the documentation in PR #385 that could be ready to merge. There were some CI failures unrelated to the CalVer changes for type errors in |
See discussion in PR: #385 (comment) From my experimentation, I feel that mixing CalVer and SemVer should be avoided, but If needed, bumpver is a good alternative, which could be used alongside commitizen Update: I can't actually close this ticket...oops |
I've been thinking about this for so long, I thought I created this issue 🤦♂️ Feel free to ignore my thoughts and implement CalVer anyway! Sorry @Lee-W |
Not at all. Thanks for your hard work 🙂 It was just a random idea to see whether it's possible to support CalVer. It's super helpful to know it might not be a good idea. I'm thinking of adding "why we don't implement CalVer" to FAQ. @KyleKing Not sure whether you're interested in adding this section. I can do it when I have time as well 🙂 |
Sure, I would be happy to open a PR! I searched for someone more credible discussing why not to combine the two, but I really couldn't find anything. Most articles presented the decision as "SemVer OR CalVer" so I think I can work that into a good explanation |
As the documentation PR is closed, let's close this one |
No description provided.
The text was updated successfully, but these errors were encountered: