forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws-iam-authenticator.rb
38 lines (33 loc) · 1.38 KB
/
aws-iam-authenticator.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class AwsIamAuthenticator < Formula
desc "Use AWS IAM credentials to authenticate to Kubernetes"
homepage "https://github.com/kubernetes-sigs/aws-iam-authenticator"
url "https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/v0.4.0.tar.gz"
sha256 "d077ce973e5917fab7cbad46bc2d19264e8d0ae23321afd97b1bc481075a31fa"
bottle do
cellar :any_skip_relocation
sha256 "524c545b1b500aa81a578371f59c487a31f6b20463731051cc5f3e30551b8b63" => :mojave
sha256 "7c773fefb0506db8b95ed918ff639ede96b58a4d0d2a51d2faf941f30a61ad84" => :high_sierra
sha256 "d333ce7bf5e32215161a5f8ba82e86c47a425c9782d8281ab36d66a4bb7cd6f0" => :sierra
end
depends_on "dep" => :build
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/kubernetes-sigs/aws-iam-authenticator").install buildpath.children
cd "src/github.com/kubernetes-sigs/aws-iam-authenticator" do
system "dep", "ensure", "-vendor-only"
cd "cmd/aws-iam-authenticator" do
system "go", "build", "-o", "aws-iam-authenticator"
bin.install "aws-iam-authenticator"
end
prefix.install_metafiles
end
end
test do
system "#{bin}/aws-iam-authenticator", "init", "-i", "test"
contents = Dir.entries(".")
["cert.pem", "key.pem", "aws-iam-authenticator.kubeconfig"].each do |created|
assert_include contents, created
end
end
end