#分发 #模板生成器 #homebrew #仓库 #分发 #项目 #持续

bin+lib cargo-distribute

为 Rust 项目向 homebrew、linuxbrew 和 scoop 持续分发提供模板生成器

5 个版本

0.202106.16 2021 年 6 月 9 日
0.202106.15 2021 年 6 月 4 日
0.202106.14 2021 年 6 月 4 日
0.202106.12 2021 年 6 月 4 日
0.202106.0 2021 年 6 月 4 日

438Cargo 插件

MIT 许可证

75KB
289

cargo-distribute

进行中

安装

cargo insatll cargo-distribute

使用方法

为了使用 homebrew 分发软件包,需要两个仓库。

步骤 1. 创建一个 usename/homebrew-tap 仓库

~$ mkdir ~/homebrew-tap
~$ cd $_
~/homebrew-tap$ git init
~/homebrew-tap$ git push

步骤 4. 使用 cargo-ditribute 生成必要的文件

将生成两个文件。 - myproject/.github/workflows/release.yml - homebrew-tap/templates/myproject.rb

在每个仓库中进行 git commit 和 push。 username/myprojectusername/homebrew-tap

~$ cd ~/myproject
~/myproject$ echo ./Cargo.toml
~/myproject$ cargo distribute --tap ~/homebrew-tap
~/myproject$ git -A && git commit -m "commit"
~/myproject$ git push
~$ cd ~/homebrew-tap
~/homebrew-tap$ git -A && git commit -m "commit"
~/homebrew-tap$ git push

步骤 5. 为 username/myproject 添加标签并推送

这将触发分发。

~$ cd myproject
~/myproject$ git tag vX.Y.Z
~/myproject$ git push --tags

依赖项

~9–22MB
~248K SLoC