https://mfirhas.com/rss.xml

Semantic Versioning

07 Oct 2017Updated on 24 Nov 2024

How to version Software Development

Format

vX.Y.Z
  • X: Major Version. When you make changes causing breaking public API compatibility, or breaking behaviour. Most practices treat X < 1 as unstable meaning any changes could cause breaking API/interfaces/behaviours.
  • Y: Minor Version. When you add features/changes into the program without breaking existing public APIs/interfaces.
  • Z: Patches. When you add patches in form of bugs fixing or small changes that are not part of features. This could be some improvements for performance, or some refactoring.

Workflow

Use Git feature called tag which will tag commit that is ready for incrementing the version number. Tag Current Commit unannotated:

git tag vX.Y.Z

annotated:

git tag -a vX.Y.Z -m "tag message"

Tag Previous Commit unannotated:

git tag vX.Y.Z <commit_id>

annotated:

git tag -a vX.Y.Z <commit_id> -m "tag message"

Mind you that there'll be custom versioning made to adjust the software development culture or release cycle. For example adding postfix -RELEASE, or using edition correlated with release cycle in years.


Sources: