0
0
mirror of https://github.com/semver/semver.git synced 2025-08-25 15:25:29 +00:00

Use . instead of ~ as pre-release part separator.

I realized that there is no point in using an exotic tilde when a dot will do
just fine. In addition to being simpler and less weird, this change also means
that you can tag these versions in Git, since ~ is invalid in Git tag names.
This commit is contained in:
Tom Preston-Werner 2011-11-19 12:49:38 -08:00
parent b8f12d78c6
commit 8e95cdbea8

View File

@ -52,18 +52,18 @@ version MUST be reset to zero. When a minor version number is incremented, the
patch version MUST be reset to zero. For instance: 1.1.3 -> 2.0.0 and 2.1.7 -> patch version MUST be reset to zero. For instance: 1.1.3 -> 2.0.0 and 2.1.7 ->
2.2.0. 2.2.0.
1. A pre-release version number MAY be denoted by appending a dash and a 1. A pre-release version MAY be denoted by appending a dash and a qualifying
qualifying string immediately following the patch version. The qualifying string immediately following the patch version. The qualifying string is
string is comprised of a mandatory identifier and an optional sequence number. comprised of a mandatory identifier and an optional sequence number. If the
If the sequence number is used, it MUST be separated from the identifier by a sequence number is used, it MUST be separated from the identifier by a period.
tilde. Identifiers MUST be comprised of only alphanumerics plus dash Identifiers MUST be comprised of only alphanumerics plus dash [0-9A-Za-z-].
[0-9A-Za-z-]. Sequence numbers MUST be comprised of only digits [0-9]. Sequence numbers MUST be comprised of only digits [0-9]. Pre-release versions
Pre-release versions satisfy but have a lower precedence than the associated satisfy but have a lower precedence than the associated normal version.
normal version. Precedence SHOULD be determined by lexicographic ASCII sort Precedence SHOULD be determined by lexicographic ASCII sort order of the
order of the identifier followed by numeric sort order of the sequence number. identifier followed by numeric sort order of the sequence number. If the
If the sequence number is absent, it MUST be considered to be zero. For sequence number is absent, it MUST be considered to be zero. For example:
example: 1.0.0-alpha < 1.0.0-alpha~1 < 1.0.0-beta~2 < 1.0.0-beta~11 < 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 <
1.0.0-rc~1 < 1.0.0. 1.0.0.
1. Once a versioned package has been released, the contents of that version 1. Once a versioned package has been released, the contents of that version
MUST NOT be modified. Any modifications must be released as a new version. MUST NOT be modified. Any modifications must be released as a new version.