From ea2bcb55ed0b96f006d8970f7ecc3697972e513e Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Tue, 25 Sep 2018 20:09:28 -0700 Subject: [PATCH] goreman 0.2.1 (new formula) Fixes mattn/goreman#73. Closes #32445. Signed-off-by: Igor Kapkov --- Formula/goreman.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Formula/goreman.rb diff --git a/Formula/goreman.rb b/Formula/goreman.rb new file mode 100644 index 0000000000..f29121f040 --- /dev/null +++ b/Formula/goreman.rb @@ -0,0 +1,28 @@ +class Goreman < Formula + desc "Foreman clone written in Go" + homepage "https://github.com/mattn/goreman" + url "https://github.com/mattn/goreman/archive/v0.2.1.tar.gz" + sha256 "c1ef360fcc92688956bc7a18fae089d78754bd1dde22a89b27228ae5a840cc45" + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "on" + + srcpath = buildpath/"src/github.com/mattn/goreman" + srcpath.install buildpath.children + + cd srcpath do + system "go", "build", "-o", bin/"goreman" + prefix.install_metafiles + end + end + + test do + (testpath/"Procfile").write "web: echo 'hello' > goreman-homebrew-test.out" + system bin/"goreman", "start" + assert_predicate testpath/"goreman-homebrew-test.out", :exist? + assert_match "hello", (testpath/"goreman-homebrew-test.out").read + end +end