1 个不稳定版本
0.1.0 | 2024年2月24日 |
---|
#4 在 #minor
9KB
106 代码行
版本号工具
概述
该工具是 rust semver
库的包装器,以便其功能可以在命令行上使用。它可以递增 semver 字符串的主版本号、次版本号或修订号,并对 semver 字符串进行比较。
特性
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
安装
从 crates.io
cargo install semver-tool
贡献
见 https://github.com/patbeagan1/Open-Source-Requests
许可
本项目遵循 MIT 许可协议
- 有关详细信息,请参阅 LICENSE 文件。
依赖
~1.5MB
~25K SLoC