Working with semvers
APACHE-2.0 License
semv (pronounce [zɛmpf]) is a command line tool for working with semantic versions (semver).
go install github.com/elgohr/semv@latest
Find the binaries in the releases.
Returns the incremented version.
With the version as a variable
semv increment (--patch/--minor/--major) ${currentVersion}
Piped from another command
cat oldVersion.txt | semv increment (--patch/--minor/--major)
semv compare ${firstVersion} ${secondVersion}
Result | Description |
---|---|
-1 | ${firstVersion} is lower than ${secondVersion} |
0 | ${firstVersion} is equal than ${secondVersion} |
1 | ${firstVersion} is higher than ${secondVersion} |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.