homebrew-core/Formula/terragrunt.rb
2017-04-28 12:30:24 +02:00

31 lines
1.2 KiB
Ruby

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.12.14.tar.gz"
sha256 "6063ce9b28beb4e0c03e9f8a292fc6400c3aef4468741a146097c955be549e32"
head "https://github.com/gruntwork-io/terragrunt.git"
bottle do
cellar :any_skip_relocation
sha256 "9edfca06dd24877a56e0e6425fdd7ed944176d0ed085bde8aefb562bdbe1fa97" => :sierra
sha256 "78f318dbd6342cc84f56f6d4d7b6a0e36888a84b81b7abaf81888ac4f10ddd75" => :el_capitan
sha256 "897b564714b51c5b43ef582dbfc69b9cfed83668a7577804728a1d1c2cecc481" => :yosemite
end
depends_on "glide" => :build
depends_on "go" => :build
depends_on "terraform"
def install
ENV["GOPATH"] = buildpath
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
mkdir_p buildpath/"src/github.com/gruntwork-io/"
ln_s buildpath, buildpath/"src/github.com/gruntwork-io/terragrunt"
system "glide", "install"
system "go", "build", "-o", bin/"terragrunt", "-ldflags", "-X main.VERSION=v#{version}"
end
test do
assert_match version.to_s, shell_output("#{bin}/terragrunt --version")
end
end