mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #515] Undefined values for pre-release version strings #3096
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 @jaques-sam on GitHub (May 16, 2019).
Original GitHub issue: https://github.com/semver/semver/issues/515
The document is missing the priority/level of each of the version strings:
What is the order here?? I would expect: pre < alpha < beta < rc
@klehelley commented on GitHub (May 17, 2019):
Different teams have different expectations. The SemVer spec does not want to become so specific that people who just want the rules about breaking/non-breaking/fix version management cannot use it. So I do not think the "priority/level" you are talking about are missing. The spec does not forbid anyone to define additional rules for their project in that regard.
As it stands, with the strings you provide the order according to rule 11 is as follows:
1.0.0-alpha < 1.0.0-beta < 1.0.0-pre < 1.0.0-rc < 1.0.0.If you want a different order, you can consider prefixing your strings with a number. For example
1.0.0-0-dev<1.0.0-1-alpha<1.0.0-2-beta<1.0.0-3-qa<1.0.0-4-demo...@jaques-sam commented on GitHub (May 17, 2019):
Yes rule 11 is good, but still we all want to use the same terminology right? Like described here https://en.wikipedia.org/wiki/Software_release_life_cycle#/media/File:Software_dev2.svg
Why would somebody change the order?
@ljharb commented on GitHub (May 17, 2019):
Isn’t any term allowed? I can release
1.0.0-yogurt.0if i want, i thought@runeimp commented on GitHub (May 18, 2019):
Yes, you can use any terminology you like as pre-release labels. The alpha, beta, etc. is a common example. The spec just states that the pre-release version should be sorted lexically (in other words alphabetically) when the version is alphabetic in nature with longer sets having higher precedence. Sort numbers numerically, e.g. 0001 < 2.
Regarding changing the order it's up to the creator of the software, genetic code sequencing API, car building robot API, etc. for what is meaningful. In different industries there are different terminologies used.
@jaques-sam commented on GitHub (May 20, 2019):
Okay, fine for me. Of course, this makes the way software is released for every software package differently.