prototool 1.2.0 (new formula)

Closes #31440.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Peter Edge 2018-08-24 17:28:05 +02:00 committed by FX Coudert
parent 00c5c9e6e9
commit d909aa3406

30
Formula/prototool.rb Normal file
View file

@ -0,0 +1,30 @@
class Prototool < Formula
desc "Your Swiss Army Knife for Protocol Buffers"
homepage "https://github.com/uber/prototool"
url "https://github.com/uber/prototool/archive/v1.2.0.tar.gz"
sha256 "16654242f1f22eaeb2df0c33366ef7a22fda674b51bd4c8da38e0ffab62ce236"
depends_on "glide" => :build
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
dir = buildpath/"src/github.com/uber/prototool"
dir.install buildpath.children
cd dir do
system "make", "brewgen"
cd "brew" do
bin.install "bin/prototool"
bash_completion.install "etc/bash_completion.d/prototool"
zsh_completion.install "etc/zsh/site-functions/_prototool"
man1.install Dir["share/man/man1/*.1"]
prefix.install_metafiles
end
end
end
test do
system bin/"prototool", "config", "init"
assert_predicate testpath/"prototool.yaml", :exist?
end
end