简体中文 | English
使用发布脚本,让 Git tag 指向的提交本身就已经包含匹配的 Cargo 版本号。
.\scripts\release.ps1 v0.5.7 -Push脚本会:
- 要求已跟踪文件没有未提交改动
- 更新
Cargo.toml和Cargo.lock里的meatshell版本号 - 运行
cargo check --locked - 验证
meatshell --version输出匹配 tag - 提交版本号变更
- 创建 annotated tag
- 传入
-Push时推送当前分支和 tag
如果想先在本地创建提交和 tag,不立即推送:
.\scripts\release.ps1 v0.5.7
git push origin HEAD
git push origin v0.5.7Release workflow 也会检查推送上来的 tag。比如 tag 名是 v0.5.7 时,
Cargo.toml、Cargo.lock 和构建出的 meatshell --version 都必须是
0.5.7,否则 workflow 会在发布前失败。
Use the release helper so the tag points at a commit whose Cargo package version matches the tag.
.\scripts\release.ps1 v0.5.7 -PushThe script:
- requires no uncommitted tracked-file changes
- updates
Cargo.tomland themeatshellentry inCargo.lock - runs
cargo check --locked - verifies that
meatshell --versionmatches the tag - commits the version bump
- creates an annotated tag
- pushes the current branch and tag when
-Pushis passed
To prepare the commit and tag without pushing:
.\scripts\release.ps1 v0.5.7
git push origin HEAD
git push origin v0.5.7The release workflow also checks pushed tags. A tag named v0.5.7 must match
Cargo.toml, Cargo.lock, and the built meatshell --version output,
otherwise the workflow fails before publishing.