Development versions and semver

Let’s assume you are developing what will be released one day as your project version 2.0, so your main/master branch has not been yet tagged as 2.0.0-alpha (which is still far ahead in time).

My first option would be using “2.0.0-dev” as version in mix.exs.

However: 2.0.0-alpha according to semver compares less than 2.0.0-dev ¹, on the other hand 2.0.0-alpha will be likely the next tag as soon as we get closer to the final 2.0.0: > Version.compare("2.0.0-alpha", "2.0.0-dev"):lt. So according to semver -dev comes after.

Conversely, using a version number such as 1.99.0 or something like that would be against semver too.

What kind of approach would be compatible with semver? It looks like Elixir main branch use -dev suffix, so maybe I didn’t get something about semver.

1 Like

If you don’t release 2.0.0-dev, does it matter much?

1 Like