From aa7e21b1bac25438ebef73bb6b8ac24b1d145640 Mon Sep 17 00:00:00 2001 From: Dominik Nakamura Date: Sun, 17 Feb 2019 16:33:06 +0900 Subject: [PATCH] mage 1.8.0 (new formula) Closes #37042. Signed-off-by: FX Coudert --- Formula/mage.rb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Formula/mage.rb diff --git a/Formula/mage.rb b/Formula/mage.rb new file mode 100644 index 0000000000..2e1085d28c --- /dev/null +++ b/Formula/mage.rb @@ -0,0 +1,25 @@ +class Mage < Formula + desc "Make/rake-like build tool using Go" + homepage "https://magefile.org" + url "https://github.com/magefile/mage.git", + :tag => "v1.8.0", + :revision => "aedfce64c122eef47009b7f80c9771044753215d" + sha256 "e8fdfa30f68c8a90fcadd4e82f49c9136011accabff55e073ea26f5ee4280cf0" + + depends_on "go" + + def install + ENV["GOPATH"] = buildpath + (buildpath/"src/github.com/magefile/mage").install buildpath.children + cd "src/github.com/magefile/mage" do + system "go", "run", "bootstrap.go" + bin.install buildpath/"bin/mage" + prefix.install_metafiles + end + end + + test do + assert_match "magefile.go created", shell_output("#{bin}/mage -init 2>&1") + assert_predicate testpath/"magefile.go", :exist? + end +end