Skip to content

Commit

Permalink
Add Homebrew formula. (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
metmajer committed Oct 7, 2018
1 parent f695146 commit 9422d09
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions HomebrewFormula/terraform-docs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class TerraformDocs < Formula
desc "Tool to generate documentation from Terraform modules"
homepage "https://github.com/segmentio/terraform-docs"
url "https://github.com/segmentio/terraform-docs/archive/v0.4.5.tar.gz"
sha256 "78b75d3ba2525b272ae93036465bf3a5137bb259d7f7c106d026529492df2e29"

depends_on "go" => :build

def install
ENV["GOPATH"] = buildpath
dir = buildpath/"src/github.com/segmentio/terraform-docs"
dir.install buildpath.children

cd dir do
system "make", "build-darwin-amd64"
bin.install "bin/darwin-amd64/terraform-docs"
prefix.install_metafiles
end
end

test do
system "#{bin}/terraform-docs", "--version"
end
end

0 comments on commit 9422d09

Please sign in to comment.