mirror of
https://github.com/semver/semver.git
synced 2026-07-11 03:53:53 -05:00
[GH-ISSUE #634] [Question] Semver pre-release doesn't follow common format #5560
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @oliv3r on GitHub (Nov 9, 2020).
Original GitHub issue: https://github.com/semver/semver/issues/634
Pre-release data, in the form of 'release-candidates' have been done using using tags for ages, and the most common versioning for pre-releases was often been '-rc1' '-rc2' etc. However in semver two it is listed as '-rc.1'. Why this change? And more importantly, when moving from the defacto standard, why ist here no rationale written and this added to the faq?
@klehelley commented on GitHub (Nov 9, 2020):
This is a matter of coherence with the SemVer rules regarding version comparisons. It was important for them to be simple but not simplistic, as well as logical and readable.
Using the
-rc<number>prerelease format, everything will work well even with a SemVer-compatible tool as long as you have less than 9 release candidates (10 if you start at zero), asrc10<rc2. Using dots as separators and having type detection rules to allow for number comparison (instead of just string comparison) makes surerc.2<rc.10in what appears to me as a coherent, elegant manner.Ultimately, it could have been chosen to have implicit separators whenever we have a mix of alphabetical and numeric values, but the SemVer versioning scheme as it exists today has not been designed that way -- and that was a good choice IMO, I feel explicit is better than implicit in most situations.