diff --git a/Formula/fork-cleaner.rb b/Formula/fork-cleaner.rb new file mode 100644 index 0000000000..749779a997 --- /dev/null +++ b/Formula/fork-cleaner.rb @@ -0,0 +1,27 @@ +class ForkCleaner < Formula + desc "Cleans up old and inactive forks on your GitHub account" + homepage "https://github.com/caarlos0/fork-cleaner" + url "https://github.com/caarlos0/fork-cleaner/archive/v1.3.0.tar.gz" + sha256 "6cb97ed035cce26505f8d48406fb57029f629a6df19bfcfe44c8f3d7f60d1008" + revision 1 + + depends_on "dep" => :build + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + dir = buildpath/"src/github.com/caarlos0/fork-cleaner" + dir.install buildpath.children + cd dir do + system "dep", "ensure" + system "make" + bin.install "fork-cleaner" + prefix.install_metafiles + end + end + + test do + output = shell_output("#{bin}/fork-cleaner 2>&1", 1) + assert_match "missing github token", output + end +end