8 个版本 (5 个破坏性更新)
0.21.0 |
|
---|---|
0.20.0 |
|
0.19.0 | 2021年9月29日 |
0.18.1 | 2021年2月26日 |
0.0.0 | 2020年6月20日 |
#81 in #完整
每月下载量:30
29KB
513 代码行
cargo-publish-workspace
目标
- 使用单个命令将工作空间包发布到crates.io。
- 支持所有包具有相同主版本和次版本号的包版本方案。
- 为增强发布自动化做出贡献,使发布新版本所需时间更短,从而使我们能够更频繁地以较小的增量发布。
命令 & 选项
cargo-publish-workspace
Topologically publish a complete workspace
All arguments provided after two dashes (--) will be passed on to 'cargo publish'. This means, if
cargo publish-workspace itself doesn't support a flag related to publishing a cargo crate (yet), you
can still use this method. For example, you may use a custom registry with the following command
`cargo publish-workspace <..options> -- --registry <registry>`. The '--registry <registry>'
arguments will be passed to cargo publish. Note: some arguments are also passed on by cargo publish-
workspace, in which case, if also provided after the two dashes may be passed on twice. For example,
this would be the case if we would run: `cargo publish-workspace <...options> --no-verify -- --no-
verify`.
By default, a tag formatted `v<version>` (e.g. v1.0.3) will be created from the current working
directory.
USAGE:
cargo publish-workspace [FLAGS] [OPTIONS] --new-version <new-version>
FLAGS:
--dry-run
Simulate running this program
-h, --help
Prints help information
--no-git-tag
Don't create a tag after publishing
Tags are named after the new (workspace) version and prefixed with 'v'; for example
'v1.2.0'.
--no-verify
Don't build the crate before publishing
-V, --version
Prints version information
OPTIONS:
--manifest <manifest>
The workspace manifest file, usually the root Cargo.toml [default: Cargo.toml]
--new-version <new-version>
The version to which all workspace crates will be updated
Version must be semver compatible.
--sleep <sleep>
The amount of seconds to sleep between publishing of workspace packages
Allows the crate registry index to update, which may be important since consecutive
attempts to publish crates may contain the just published crate as dependency, and if
the registry hasn't processed a crate dependency yet, publishing will fail. [default:
15]
Issues, requests and questions can be submitted at: 'https://github.com/foresterre/cargo-publish-
workspace/issues', thanks!
示例
将工作空间中的包更新到 0.17.0
,发布前不进行验证。在发布包之间睡眠15秒,以便crates.io注册表有时间刷新。
cargo publish-workspace --sleep 15 --no-verify --new-version 0.17.0
依赖项
~8.5MB
~151K SLoC