Search⌘ K

Semantic Versioning Explained

Understand how to apply semantic versioning to your software releases with Jenkins X. Explore the rules for incrementing major, minor, and patch versions based on the type of change, improving clarity and automation in version control.

Semantic versioning

Semantic versioning is easy to explain and leaves very little to interpretation. We have three numbers called major, minor, and patch. If we increment minor, a patch is reset to zero or one. Similarly, if major is incremented, both the minor and the patch are set to zero or one. The number that is incremented depends on the type of change we’re releasing.

Given a version number MAJOR.MINOR.PATCH, we will increment each of the segments using the rules that follow:

  • PATCH is incremented when we release bug fixes.
  • MINOR is incremented when new functionality is added in a backward-compatible manner.
  • MAJOR is incremented when changes are not backward compatible.

Versioning for an application having an API

If, for example, our application has an API, incrementing the major version would be a clear signal to our users that they would need to adapt or continue using the previous (older) major version (assuming we keep both, as we should). ...