Skip to content

Instantly share code, notes, and snippets.

@tangoabcdelta
Last active January 30, 2021 14:31
Show Gist options
  • Save tangoabcdelta/ba52fff98818aae5486021db74c46ef6 to your computer and use it in GitHub Desktop.
Save tangoabcdelta/ba52fff98818aae5486021db74c46ef6 to your computer and use it in GitHub Desktop.
semver for alpha and beta releases

MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards compatible manner, and
  • PATCH version when you make backwards compatible bug fixes.
  • Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

H1

0.1.0
0.1.1
0.2.0
0.2.1
1.0.0-alpha.1
1.0.0-alpha.2
1.0.0-beta.1
1.0.0-beta.2
1.0.0

H3

0.1.0
0.1.1
0.2.0
0.2.1
1.0.0-alpha
1.0.1-alpha
1.0.2-beta
1.0.3-beta
1.0.3
2.0.0-rc.1 
2.0.0-rc.2
2.0.0-alpha.14
2.0.0-beta.34
  • Precedence MUST be calculated by separating the version into major, minor, patch, pre-release, and build identifiers in that order.
  • Major, minor, and patch versions are always compared numerically.
  • Pre-release and build version precedence MUST be determined by comparing each dot separated identifier as follows:
  • identifiers consisting of only digits are compared numerically
  • and identifiers with letters or dashes are compared lexically in ASCII sort order.
  • Numeric identifiers always have lower precedence than non-numeric identifiers.
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.
Example:
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+build.1 < 1.0.0 < 1.0.0+0.3.7 < 1.3.7+build < 1.3.7+build.2.b8f12d7 < 1.3.7+build.11.e0f985a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment