# Semantic Versioning

# What is Versioning

Software versioning is the process of numbering different releases of a particular software program for both internal use and release designation.

# Why is Versioning useful?

  • It allows programmers to know when changes have been made and track changes enforced in the software
  • At the same time, it enables potential customers to be acquainted with new releases and recognize the updated versions

# What is Semantic Versioning (SemVer)

Semantic Versioning (opens new window) is simple set of rules and requirements that dictate how version numbers are assigned and incremented.
These rules are based on but not necessarily limited to pre-existing widespread common practices in use in both closed and open-source software.

# Example

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes
  • MINOR version when you add functionality in a backwards compatible manner
  • PATCH version when you make backwards compatible bug fixes

For example, if we take version 5.12.2, then it has

  • major version of 5
  • minor version of 12
  • patch version of 2

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

# Advantages - Why use Semantic Versioning

  • You can keep track of every transition in the software development phase
  • Versioning can do the job of explaining the developers about what type of changes have taken place and the possible updates that should take place in the software
  • It helps to keep things clean and meaningful
  • It helps other people who might be using your project as a dependency

# Points to keep in mind

  • The first version starts at 0.1.0 and not at 0.0.1, as no bug fixes have taken place, rather we start off with a set of features as first draft of the project
  • Before 1.0.0 is only the Development Phase, where you focus on getting stuff done
  • SemVer does not cover libraries tagged 0.*.*. The first stable version is 1.0.0

# Setup

Semantic Versioning is just a simple set of rules and requirements.

For applying Semantic Versioning automatically, you may use specific software and CI actions. Check following guides