Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

releasing alpha to beta to production with SemVer

My understanding of the SemVer release cycle is as follows:

  1. My first release is going to be 0.1.0-alpha.1
  2. I may make a few tweaks and re-release at 0.1.0-alpha.2 (repeat as needed)
  3. When ready, I release 0.1.0-beta.1
  4. I may make a few tweaks and re-release at 0.1.0-alpha.2 (repeat as needed)
  5. When ready, I release into production: 1.0.0

Am I correct in keeping the same minor version throughout? The SemVer website hints at this (section 11, link below): "Example: 1.0.0-alpha < 1.0.0". This suggests that two versions of "1.0.0" can co-exist.

Or should I increment the minor/patch for each release, e.g.:

  • 0.1.0-alpha.1
  • 0.1.1-alpha.1

  • 0.1.2-beta.1

  • 0.2.0-beta.1

  • 1.0.0

If that's the case, I don't get how to use the alpha.x or beta.x increments?

Ref: https://semver.org/

like image 582
Chris B Avatar asked Jul 17 '18 04:07

Chris B


People also ask

Which is a SemVer major change?

Major change: a change that requires a major SemVer bump. Minor change: a change that requires only a minor SemVer bump. Possibly-breaking change: a change that some projects may consider major and others consider minor.

When should I increase minor version?

Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code.

What does RC mean in SemVer?

This answer is not useful. Show activity on this post. RC means release candidate. A release candidate (RC) version is a beta version likely to be a stable product. Generally, the last two releases may be stable release.


1 Answers

The SemVer spec gives you a lot of flexibility. Nothing in the spec precludes your using the numbered scenario you describe in your original post. Your alternative suggestion is also valid, as far as SemVer is concerned. Both scenarios start out with the 0.y.z form, which is meant to be used for initial development leading up to 1.0.0. Any applied prerelease tags are mostly sugar, though they will factor into the sort order (1.0.0 > 0.1.0 > 0.1.0-otherPreleaseTag > 0.1.0-anyPreleaseTag).

4. Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

These are all legal SemVer version histories:

H1

0.1.0
0.1.1
0.2.0
0.2.1
1.0.0

H2

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

SemVer supports an endless variety of develop/release patterns. The key is that the spec applies the same exact semantic meaning to all prerelease tags.

9. ...A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.

You just need to focus on the precedence rules, which define the sort order that is applied with deciding a match to consumer intent, from the available versions.

like image 93
jwdonahue Avatar answered Sep 25 '22 12:09

jwdonahue