parent
29884aa543
commit
b3a5b70dfe
|
@ -0,0 +1,30 @@
|
|||
class Iamy < Formula
|
||||
desc "AWS IAM import and export tool"
|
||||
homepage "https://github.com/99designs/iamy"
|
||||
url "https://github.com/99designs/iamy/archive/v2.0.0.tar.gz"
|
||||
sha256 "44906985ac2a7a0f4a703c4eb872e626770ffa1ea01a589279e75867a4348630"
|
||||
head "https://github.com/99designs/iamy.git"
|
||||
|
||||
depends_on "glide" => :build
|
||||
depends_on "go" => :build
|
||||
depends_on "awscli"
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
|
||||
dir = buildpath/"src/github.com/99designs/iamy"
|
||||
dir.install buildpath.children
|
||||
cd dir do
|
||||
system "glide", "install"
|
||||
system "go", "build", "-o", bin/"iamy", "-ldflags",
|
||||
"-X main.Version=v#{version}"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
ENV.delete "AWS_ACCESS_KEY"
|
||||
ENV.delete "AWS_SECRET_KEY"
|
||||
output = shell_output("#{bin}/iamy pull 2>&1", 1)
|
||||
assert_match "Can't determine the AWS account", output
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue