名称: Homebrew公式生成器 描述: 为macOS和Linux上的CLI分发生成Homebrew公式。 允许使用的工具: 读取, 写入, 编辑, Bash, Glob, Grep
Homebrew公式生成器
为CLI分发生成Homebrew公式。
生成模式
class Myapp < Formula
desc "我的CLI应用程序"
homepage "https://github.com/myuser/myapp"
url "https://github.com/myuser/myapp/releases/download/v1.0.0/myapp-1.0.0.tar.gz"
sha256 "abc123..."
license "MIT"
depends_on "node" => :build
def install
system "npm", "install", *std_npm_args
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
assert_match "myapp v#{version}", shell_output("#{bin}/myapp --version")
end
end
目标流程
- 包管理器发布
- CLI二进制分发