43 lines
1.4 KiB
Ruby
43 lines
1.4 KiB
Ruby
class Chamber < Formula
|
|
desc "CLI for managing secrets through AWS SSM Parameter Store"
|
|
homepage "https://github.com/segmentio/chamber"
|
|
url "https://github.com/segmentio/chamber/archive/v1.17.0.tar.gz"
|
|
sha256 "ad9204125829cb63c867547c9e1ec18ebdbbdabc9794d8e80fac7c8ba141666a"
|
|
head "https://github.com/segmentio/chamber.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "21c3003833cea999424b092168aaed189d333b1ea58e069376f73f6d682964f8" => :high_sierra
|
|
sha256 "b546c8f522dce5cef87cc81bef6753d90353aad1aa2e3d7fbc488ebe091b61f5" => :sierra
|
|
sha256 "dd5fbd17d724eec79b37082ea659525c64fa412533d3a83d53eb019d338d1a4e" => :el_capitan
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "govendor" => :build
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
ENV["GOOS"] = "darwin"
|
|
ENV["GOARCH"] = "amd64"
|
|
ENV["CGO_ENABLED"] = "0"
|
|
|
|
path = buildpath/"src/github.com/segmentio/chamber"
|
|
path.install Dir["{*,.git}"]
|
|
|
|
cd buildpath/"src/github.com/segmentio/chamber" do
|
|
system "govendor", "sync"
|
|
system "go", "build", "-o", bin/"chamber"
|
|
prefix.install_metafiles
|
|
end
|
|
end
|
|
|
|
test do
|
|
ENV.delete "AWS_REGION"
|
|
output = shell_output("#{bin}/chamber list service 2>&1", 1)
|
|
assert_match "MissingRegion", output
|
|
|
|
ENV["AWS_REGION"] = "us-west-2"
|
|
output = shell_output("#{bin}/chamber list service 2>&1", 1)
|
|
assert_match "NoCredentialProviders", output
|
|
end
|
|
end
|