major.minor.patch aka Semantic Versioning

Many of the distributions mentioned in CLI distribution section expect or even require your versioning scheme to be compatible with Semantic Versioning (SemVer). Unless you have specific needs, that can’t even be supported by SemVer’s Build metadata section, choosing SemVer is the most compatible option.

When deciding on the versioning, you can consider few more aspects and needs specific to your application:

  • Do you want (or can you even?) support installing a specific major version or version ranges? Will users be able to install multipush@v1, multipush@v2 or multipush@<1.1.0? Or will they always have to specify full version identifier like multipush@1.0.0+2023-01-01? If we allow version ranges, then extra care needs to be taken to not introduce a regression?
  • Will only the latest version be supported? Then it’s a good idea to indicate to users how old their version is - possibly by including a build date to the version number? 1.0.0+2023-01-01

Semver build metadata

SemVer allows for a build metadata section, which is a set of identifiers separated by dots. This is a good place to include a build date, or a commit hash, or a build number.

multipush v1.0.0+2023-01-01
multipush v1.0.0+e83c516

See Also