semver
; a tool to increment / compare your semantic versions
This tool is simply a wrapper around the SemVer library from Masterminds. All credits go to them for writing the library.
Usage: ./semver [flags] version [version]
If [version] is provided, the command will output the whether version is lower (-1),
equal (0), or greater (1) than [version] after the applying the major, minor, patch,
prerelease and metadata transformations to version
-major int
increase major by n
-metadata string
set metadata
-minor int
increase minor by n
-patch int
increase patch by n
-prerelease string
set prerelease
-version
output this tool's version
$ semver -major 1 -minor 1 -patch 1 1.0.0
2.1.1
$ semver -major 1 -minor 1 -patch 1 -prerelease rc1 -metadata buildx 1.0.0
2.1.1-rc1+buildx