Documentation
¶
Overview ¶
Command semver answers semantic version questions that shell cannot answer correctly.
The release tooling is otherwise shell, and deliberately so, but `sort -V` does not implement semantic version precedence. It orders a final release BELOW its own release candidates:
$ printf 'v1.0.0\nv1.0.0-rc.1\n' | sort -V v1.0.0 v1.0.0-rc.1
Semver 2.0.0 clause 11.3 requires the opposite: a pre-release has lower precedence than the associated normal version. Nothing in next-version.sh is affected, because it filters to finals before sorting and strips `-rc.N` before comparing cores, but the release soak has to compare an arbitrary incoming tag against the highest release, and that tag is routinely a candidate. Getting it backwards there deploys a superseded candidate to the soak cluster.
Tags arrive on stdin rather than being read from git, so the tests need no repository fixture and the caller decides what set of tags the question is being asked about.