48 个版本
0.12.2 | 2024 年 6 月 12 日 |
---|---|
0.11.4 | 2024 年 4 月 11 日 |
0.11.3 | 2024 年 3 月 17 日 |
0.11.2 | 2023 年 12 月 21 日 |
0.3.1 | 2021 年 3 月 30 日 |
#654 在 开发工具
75KB
2K SLoC
安装
安装 Rust 然后运行
cargo install releaser
Rust 工作区发布流程
- 从 crate 的 toml 文件中读取现有版本
- 在所有工作区 crate 的 toml 文件及其依赖项中递增版本
- 提交所有版本更改
- 创建新的 git 标签
- 运行 cargo publish --manifest-path …
- 在发布下一个 crate 之前等待一段时间(默认为 20 秒),以便使用新版本
- 推送 git 标签
Rust crate 发布流程
- 从 crate 的 toml 文件中读取现有版本
- 在 toml 文件中递增版本
- 提交所有版本更改
- 创建新的 git 标签
- 运行 cargo publish --manifest-path …
- 推送 git 标签
命令行语法
Crate or workspace releasing tool. All crates from workspace will be released on crates.io
Usage: releaser [COMMAND]
Commands:
w Release workspace specified by path
c Release single crate specified by path
b Create brew package manager Formula (package definition file) to publish it into a tap (MacOS and Linux only)
s Create scoop package manager JSON (package definition file) to publish it into bucket (Windows only)
completion Generate the autocompletion script for the specified shell
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help information
-V, --version Print version information
发布工作区
Release workspace specified by path
Usage: releaser w [OPTIONS] <INCR> <PATH>
Arguments:
<INCR> Version increment. One of the following: major, minor or patch [possible values: major, minor, patch]
<PATH> Sets workspace root path
Options:
-d, --delay <NUMBER> Delay in seconds between publish next workflow's crate [default: 20]
-a, --all Whether to add option --all-features to cargo publish command
-n, --noverify Whether to add option --no-verify to cargo publish command
-h, --help Print help information
发布简单 crate
Release single crate specified by path
Usage: releaser c [OPTIONS] <INCR> <PATH>
Arguments:
<INCR> Version increment. One of the following: major, minor or patch [possible values: major, minor, patch]
<PATH> Sets crate's root path
Options:
-a, --all Whether to add option --all-features to cargo publish command
-n, --noverify Whether to add option --no-verify to cargo publish command
-h, --help Print help information
创建 brew 软件包管理器 Formula(包定义文件),以便将其发布到 tap(仅限 MacOS 和 Linux)
Create brew package manager Formula (package definition file) to publish it into a tap (MacOS and Linux only)
Usage: releaser b [OPTIONS] --crate <PATH> --base <URI>
Options:
-c, --crate <PATH> Sets crate's path where Cargo.toml located
-l, --linux <PATH> Sets Linux package directory path
-m, --macos <PATH> Sets Mac OS x64-86 package directory path
-a, --macosarm <PATH> Sets Mac OS ARM64 package directory path
-b, --base <URI> Base URI of downloaded artifacts
-u, --output [<PATH>] File path to save result to. If not set result will be written into stdout
-h, --help Print help
创建 scoop 软件包管理器 JSON 定义文件,以便将其发布到 bucket(仅限 Windows)
Create scoop package manager JSON (package definition file) to publish it into bucket (Windows only)
Usage: releaser s [OPTIONS] --crate <PATH> --binary <PATH> --exe <FILE> --base <URI>
Options:
-c, --crate <PATH> Sets crate's path where Cargo.toml located
-i, --binary <PATH> Sets 64-bit binary package directory path
-e, --exe <FILE> Sets Windows executable name
-b, --base <URI> Base URI of downloaded artifacts
-u, --output [<PATH>] File path to save result to. If not set result will be written into stdout
-h, --help Print help information
依赖项
~13–23MB
~319K SLoC