From 4a915128da56d15c65fb8ee7041c9e170df55db3 Mon Sep 17 00:00:00 2001 From: Maximilian Bode Date: Sat, 15 Oct 2016 14:23:56 +0200 Subject: [PATCH] terragrunt 0.1.1 (new formula) Closes #5943. Signed-off-by: Mike McQuaid --- Formula/terragrunt.rb | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Formula/terragrunt.rb diff --git a/Formula/terragrunt.rb b/Formula/terragrunt.rb new file mode 100644 index 0000000000..8956ae5ab7 --- /dev/null +++ b/Formula/terragrunt.rb @@ -0,0 +1,49 @@ +require "language/go" + +class Terragrunt < Formula + desc "Thin wrapper for Terraform e.g. for locking state." + homepage "https://github.com/gruntwork-io/terragrunt" + url "https://github.com/gruntwork-io/terragrunt/archive/v0.1.1.tar.gz" + sha256 "608a3216e141bb8910c1b8813879f0c30f812e40184cbc4e2a81c22c9526788b" + head "https://github.com/gruntwork-io/terragrunt.git" + + depends_on "go" => :build + depends_on "terraform" + + go_resource "github.com/aws/aws-sdk-go" do + url "https://github.com/aws/aws-sdk-go.git", + :revision => "1b2abe886743dc2bcc78472bfd30a15dc0a61fb8" + end + + go_resource "github.com/go-errors/errors" do + url "https://github.com/go-errors/errors.git", + :revision => "a41850380601eeb43f4350f7d17c6bbd8944aaf8" + end + + go_resource "github.com/hashicorp/hcl" do + url "https://github.com/hashicorp/hcl.git", + :revision => "6f5bfed9a0a22222fbe4e731ae3481730ba41e93" + end + + go_resource "github.com/stretchr/testify" do + url "https://github.com/stretchr/testify.git", + :revision => "976c720a22c8eb4eb6a0b4348ad85ad12491a506" + end + + go_resource "github.com/urfave/cli" do + url "https://github.com/urfave/cli.git", + :revision => "55f715e28c46073d0e217e2ce8eb46b0b45e3db6" + end + + def install + mkdir_p buildpath/"src/github.com/gruntwork-io/" + ln_s buildpath, buildpath/"src/github.com/gruntwork-io/terragrunt" + ENV["GOPATH"] = buildpath + Language::Go.stage_deps resources, buildpath/"src" + system "go", "build", "-o", bin/"terragrunt", "-ldflags", "-X main.VERSION=" + version.to_s + end + + test do + assert_match version.to_s, shell_output("#{bin}/terragrunt --version") + end +end