4 个版本
0.1.5 | 2024 年 2 月 13 日 |
---|---|
0.1.3 | 2023 年 6 月 30 日 |
0.1.2 | 2023 年 6 月 30 日 |
0.1.1 | 2023 年 6 月 30 日 |
143 在 Cargo 插件
每月 23 次下载
17KB
265 代码行
cargo-semver-tool
更新您的 Rust 项目的版本!
入门
$ cargo install cargo-semver-tool
用法
$ cargo semver --help
A cargo command to help you version your rust project similar to npm-version
Usage: cargo-semver <COMMAND>
Commands:
get Return the project's current version
bump Bump the project's version
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
可用子命令
cargosemver get
用法
$ cargo semver get --help
Return the project's current version
Usage: cargo-semver get
Options:
-h, --help Print help
cargosemver bump --help
用法
Bump the project's version
Usage: cargo-semver bump [OPTIONS] [BUMP]
Arguments:
[BUMP]
[default: patch]
Possible values:
- major: Bump the major digit of the version
1.0.0 -> 2.0.0
1.1.0 -> 2.0.0
2.0.0-1 -> 2.0.0
- minor: Bump the minor digit of the version
1.0.0 -> 1.1.0
1.0.1 -> 1.1.0
1.1.0-1 -> 1.1.0
- patch: Bump the patch digit of the version
1.0.0 -> 1.0.1
1.0.0-1 -> 1.0.0
- premajor: Bump the major digit of the version as a prerelease
1.0.0 -> 2.0.0-0
2.0.0-0 -> 2.0.0-1
- preminor: Bump the minor digit of the version as a prerelease
1.0.0 -> 1.1.0-0
1.1.0-0 -> 1.1.0-1
- prepatch: Bump the patch digit of the version as a prerelease
1.0.0 -> 1.0.1-0
1.0.1-0 -> 1.0.1-1
- prerelease: Bump the prelease version, or behaves like prepatch
1.1.0 -> 1.1.1-0
1.1.1-0 -> 1.1.1-1
1.1.0-5 -> 1.1.0-6
- release: Bump the version from a prerelease, or behaves like patch
1.1.0 -> 1.1.1
1.1.1-5 -> 1.1.1
Options:
-d, --dry-run
Display only, do not write the file
-h, --help
Print help (see a summary with '-h')
许可证: Apache-2.0
依赖
~4MB
~74K SLoC