From ec6c6c29b2a3eff443eb6aeac6fa768fa05595a5 Mon Sep 17 00:00:00 2001 From: Alexander Merkulov Date: Mon, 11 Sep 2017 03:16:23 +0300 Subject: [PATCH] iron-functions 0.2.68 (new formula) Closes #17908. Signed-off-by: Alex Dunn --- Formula/iron-functions.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Formula/iron-functions.rb diff --git a/Formula/iron-functions.rb b/Formula/iron-functions.rb new file mode 100644 index 0000000000..551724a7ea --- /dev/null +++ b/Formula/iron-functions.rb @@ -0,0 +1,29 @@ +class IronFunctions < Formula + desc "Go version of the IronFunctions command-line tools" + homepage "https://github.com/iron-io/functions" + url "https://github.com/iron-io/functions/archive/0.2.68.tar.gz" + sha256 "81700463d0ded0966cc69261112eba9d479c31dbd4006e38243ef8f818a70f69" + + depends_on "dep" => :build + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + dir = buildpath/"src/github.com/iron-io/functions" + dir.install Dir["*"] + cd dir/"fn" do + system "make", "dep" + system "go", "build", "-o", bin/"fn" + prefix.install_metafiles + end + end + + test do + expected = <<-EOS.undent + runtime: go + func.yaml created. + EOS + output = shell_output("#{bin}/fn init --runtime go user/some 2>&1") + assert_equal expected, output + end +end