...
All versions post-1.0.0 should sort correctly with github.com/hashicorp/go-version and sort --version-sort. This ensures compatibility with downstream package managers’ version ordering. Note that the calver scheme is compatible with the previous semver scheme in this regard. Importantly, alphabetic components (e.g. beta, rc) can only appear after a - character, and must be separated from any following numeric components by a . character to ensure that e.g. 1.1-rc.2 sorts before 1.1-rc.10. For example, the following tags sort in the listed order:
20.1 .0 (final major release)
20.1.0.1 (final patch release)
120.12-alpha.1 (alpha release)
120.12-alpha.2 (alpha release, second candidate)
120.12-beta.1 (beta release)
120.12-beta.2 (beta release, second beta)
120.12-rc.1 (first release candidate)
120.12-rc.2 (second release candidate)
120.1 2 (final major release)
There are some legacy cases:
...