-
Notifications
You must be signed in to change notification settings - Fork 4
Description
So, I built Stringly.Typed to make "building things from strings" easier, seems this project (and another at a current client) could really use a "Semantic Version Number".
So, let's make it happen!
🏁
- Parse a SemVer number from a
string. - Implement operators for "equality", "less than" and "greater than".
- Ensure we can capture the "pre-release" and "metadata" tags as well, super-useful!
- Create separate package for this -
SemVer.Stringly.Typed? (a la Definitely.Typed)
NOTES
Pay particular attention to the section on metadata precedence:
Precedence for two pre-release versions with the same major, minor, and patch version MUST be determined by comparing each dot separated identifier from left to right until a difference is found as follows: identifiers consisting of only digits are compared numerically and identifiers with letters or hyphens are compared lexically in ASCII sort order. Numeric identifiers always have lower precedence than non-numeric identifiers. A larger set of pre-release fields has a higher precedence than a smaller set, if all of the preceding identifiers are equal. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.