semver

command
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL