Semantic Versioning – going from one major version to another?

  softwareengineering

How should versions be bumped during development between two major versions?
For example let say I have version 1.5.0 and my target is to release new major version that will be incompatible with major version 1.

As soon as I start developing and making changes, those changes will be backwards incompatible, so by following semantic versioning, should I already bump it to 2.0.0? But development is in progress and code is still unstable.

Or should I bump like any other compatible feature -> 1.6.0, 1.6.1, 1.7.0 etc. and when new major version is ready, just bump to 2.0.0?

Should it be suffixed with something like 2.0.0-alpha and then reset 2.0.0, once it stable? Or bump 1.5.0-alpha (though does not look right).

P.S. When starting from scratch, it makes sense to start with 0.1.0, because there is no major version yet, but when there is one, it gets tricky..:)

4

As soon as I start developing and making changes, those changes will be backwards incompatible, so by following semantic versioning, should I already bump it to 2.0.0? But development is in progress and code is still unstable.

You answer your own question here: “development is in progress and code is still unstable“, so the code isn’t ready for release. Semantic versioning applies to releases, not commits etc. So there is no issue. Your last release remains 1.5.0 until you are ready to release the next version, which is 2.0.0.

Of course, whilst you are developing, you may wish to release early, pre-release versions. Then you append that fact to the version number, eg 2.0.0-alpha001, 2.0.0-rc3 etc as required.

3

LEAVE A COMMENT