Semantic Versioning (SemVer in short) is a universal way of versioning things like applications, plugins, libraries, etc. This way everyone can relate to a version by just looking at the text.

How it is represented

SemVer is basically based on 3 components and is represented as x.y.z where;

x: stands for a major version

y: stands for a feature version (minor version)

z: stands for a patch

For example let’s say we have a starting version of 1.1.3 in an app.

When it comes to the stage that we need to decide a version code, SemVer depends on us to increment one of the x, y and z values.

If all we did was fixing some bugs that were in the application we bump up the z value and the new version would look like “1.1.4”.

If we included a new feature in our release we increment the y value which gives us a version of “1.2.0”.

On the other hand if we included so many features that is likely to break on our existing API, we increment the x value so we will have a new version of “2.0.0”

What can we say by just looking at a version number?

For example purposes take version “2.2.15”. What can we say about this version?

There have so far been 2 major releases of the application and it was followed by 2 updates which introduced new features. These 2 features are backward compatible with the API. Also, we can say that the 2nd feature had 15 updates of bug fixes up until now.

I use my knowledge in SemVer in order to decide whether I should update an app on the Google Play Store. When there’s an updated I look at the new version number and the version I have on my phone already. If it’s just a bug fix and I don’t currently have any issues with the app I usually don’t update. In every other scenario I decide to update the app. (This is of course personal preference)

Versioning starts with 0.1.0 — not 0.0.1

Yes this is true, a little strange until you look into it. It makes sense here because we do not start with a bug fix — we have some kind of feature on an application to start with right!

All versions before 1.0.0 are development versions

There are lot of builds and hours that we spend on making sure our app works like we expect it to. We create builds of incremental features and bug fixes while the app is in development mode.

However, if your app is already on production which means there are a set of users depending on your app, your app should be on or above “1.0.0”.

Let’s say you’re done with all the features but you still want to release an alpha version first. This is called a pre-release. For example the pre-releases of your “1.0.0” version would go “1.0.0-alpha.1”, “1.0.0-alpha.2” and so on.

Try to implement SemVer from your next release. I would appreciate any comments on the article. Help this reach other people by showing a little support by 👏👏👏👏👏