-
-
Notifications
You must be signed in to change notification settings - Fork 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
PATCH version is set to 1 instead of 0 #776
Comments
I guess you could say we do set it to one. And then we start counting commits and find one, so we set the version height to 1 to match. SemVer also probably was written with the idea in mind that people manually increment the number with each release, such that patch goes from 0 to 1 to 2 with each release. We don't do that either, since NB.GV goes up implicitly with each commit. In summary: when you're setting PATCH with commit counts, it's really hard (and kinda pointless) to have your actual next release be any particular number, let alone 0. But if you really care about version numbers for branding purposes, you can set |
I understand the idea of counting versions height. And 1 in that case is natural (height can't be 0), but then I see here a leaked abstraction, because an implementation detail (git height) affects contract (SemVer). It doesn't matter how we decide to implement a contract: automatically or manually - we can't violate SemVer logic just because in some implementation it looks unnatural and still call it SemVer.
That's not actually true, because we change the version only for the official/public change that means merging to a master/main branch (it can be done via the pull request, yes). And we do not change app version when committing to the feature/dev branch, otherwise it's definitely not SemVer. For CI builds of the feature branches can be used build versions like current version + git hash(https://semver.org/#spec-item-10) or yyyymmdd# (default versioning in Azure DevOps):
Sorry I didn't understand you. Let's consider an example:
We've got pretty inconsistent behaviour here making +1 or +2 versions. Also I've read this discussion #102 (comment) (didn't find it before, my bad). And based on what you wrote there you do not want to use x.y.0 because:
You versioning schema with https://semver.org/#spec-item-9
|
When MAJOR or MINOR is increased PATCH version is set to 1 and not to 0 as SemVer says:
https://semver.org/#spec-item-7
https://semver.org/#spec-item-8
The text was updated successfully, but these errors were encountered: