homebrew-core/Formula/git-sizer.rb
2018-03-08 09:41:03 +01:00

30 lines
1 KiB
Ruby

class GitSizer < Formula
desc "Compute various size metrics for a Git repository"
homepage "https://github.com/github/git-sizer"
url "https://github.com/github/git-sizer/archive/v1.0.0.tar.gz"
sha256 "8ef6b2adb646ccb72f5ccfebd19a57371b119da1aac02ef06f1a46af6f7447a0"
bottle do
cellar :any_skip_relocation
sha256 "5077977cefe0eda0b379b5aa1afebaeec394ee7b0925460f6d0062fbf35db6a7" => :high_sierra
sha256 "c9cc6a31b7a683cb7e84492a88bb7ef9a983cca2201263eefb6b3bffe8cfbcc2" => :sierra
sha256 "4071c7761174477eb9147f95450c9f8d027f8ce344aa227b33419466905056f4" => :el_capitan
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/github/git-sizer").install buildpath.children
cd "src/github.com/github/git-sizer" do
system "go", "build", "-o", bin/"git-sizer"
prefix.install_metafiles
end
end
test do
system "git", "init"
output = shell_output("#{bin}/git-sizer")
assert_match "No problems above the current threshold were found", output
end
end