1 unstable release
0.1.0 | Feb 24, 2024 |
---|
#4 in #minor
9KB
106 lines
Semver-tool
Overview
This tool is a wrapper around the rust semver
library, so that its functionality can be available on the command line. It can increment the major, minor or patch numbers of a semver string, and perform comparisons on semver strings.
Features
Manipulate semantic versioning numbers. It allows for a semantic version to be incremented by either
the major, minor, or patch number.
USAGE:
semver-tool [SUBCOMMAND]
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
--next-major Increment the major version
Major version X (X.y.z | X > 0) MUST be incremented if any backward
incompatible changes are introduced to the public API. It MAY also include
minor and patch level changes. Patch and minor versions MUST be reset to 0
when major version is incremented.
https://semver.org/#spec-item-8
--next-minor Increment the minor version
Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backward
compatible functionality is introduced to the public API. It MUST be
incremented if any public API functionality is marked as deprecated. It MAY
be incremented if substantial new functionality or improvements are
introduced within the private code. It MAY include patch level changes.
Patch version MUST be reset to 0 when minor version is incremented.
https://semver.org/#spec-item-7
--next-patch Increment the patch version
Patch version Z (x.y.Z | x > 0) MUST be incremented if only backward
compatible bug fixes are introduced. A bug fix is defined as an internal
change that fixes incorrect behavior.
https://semver.org/#spec-item-6
compare Compare two semantic versions.
Returns success if second value is greater, else fails.
https://semver.org/#spec-item-11
help Print this message or the help of the given subcommand(s)
init Prints the first possible semantic version
validate Validates a semantic version.
Returns success if the version is valid as a semver string, else fails.
https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions
Installation
From crates.io
cargo install semver-tool
Contributing
See https://github.com/patbeagan1/Open-Source-Requests
License
This project is licensed under The MIT License
- see the LICENSE file for details.
Dependencies
~1.5MB
~25K SLoC