homebrew-core/Formula/berglas.rb

32 lines
1.1 KiB
Ruby
Raw Normal View History

class Berglas < Formula
desc "Tool for managing secrets on Google Cloud"
homepage "https://github.com/GoogleCloudPlatform/berglas"
url "https://github.com/GoogleCloudPlatform/berglas/archive/v0.2.1.tar.gz"
sha256 "31b25cfe81e72e8af9c6d856f714765be7acf204acf37f0ebae5d801bfe49e4c"
2019-09-14 14:27:36 +00:00
bottle do
cellar :any_skip_relocation
2019-10-13 17:11:03 +00:00
sha256 "26c99b55d3c745bb585248077816dc3673113dd80b1f441461a3e67b178318d7" => :catalina
sha256 "f32a7a8634d9a7a530d9b93b1aab3414ada1f71b2211db37073dc170908964d2" => :mojave
sha256 "6e716ee0f9c86c302f3c747f842bad61f0310c52bede3107c68eecc31fec4489" => :high_sierra
2019-09-14 14:27:36 +00:00
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/GoogleCloudPlatform/berglas").install buildpath.children
cd "src/github.com/GoogleCloudPlatform/berglas" do
system "go", "build", "-o", bin/"berglas"
prefix.install_metafiles
end
end
test do
assert_match "#{version}\n", shell_output("#{bin}/berglas --version 2>&1")
out = shell_output("#{bin}/berglas list homebrewtest 2>&1", 60)
assert_match "could not find default credentials.", out
end
end