43 lines
1.3 KiB
Ruby
43 lines
1.3 KiB
Ruby
class Eksctl < Formula
|
|
desc "The official CLI for Amazon EKS"
|
|
homepage "https://eksctl.io"
|
|
url "https://github.com/weaveworks/eksctl.git",
|
|
tag: "0.27.0",
|
|
revision: "1a00f96d2af62d4a69686500d7328053da2771fc"
|
|
license "Apache-2.0"
|
|
head "https://github.com/weaveworks/eksctl.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "b2b39a58c6f05bd43415efd94cb26fb583f928af2e3fdb55782d4ea3783772cf" => :catalina
|
|
sha256 "f0aacca80cc37f6c2178a5cd8dd5400f7e00b859ce42a1b18c3bee7f20d1b09f" => :mojave
|
|
sha256 "57d5cdd0bced399b2a29a1707284ba62ee2462a63cf069341845981a7271c538" => :high_sierra
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "go-bindata" => :build
|
|
depends_on "aws-iam-authenticator"
|
|
|
|
def install
|
|
ENV["GOBIN"] = HOMEBREW_PREFIX/"bin"
|
|
system "make", "build"
|
|
bin.install "eksctl"
|
|
|
|
# Install bash completion
|
|
output = Utils.safe_popen_read("#{bin}/eksctl", "completion", "bash")
|
|
(bash_completion/"eksctl").write output
|
|
|
|
# Install zsh completion
|
|
output = Utils.safe_popen_read("#{bin}/eksctl", "completion", "zsh")
|
|
(zsh_completion/"_eksctl").write output
|
|
end
|
|
|
|
test do
|
|
assert_match "The official CLI for Amazon EKS",
|
|
shell_output("#{bin}/eksctl --help")
|
|
|
|
assert_match "Error: --cluster must be set",
|
|
shell_output("#{bin}/eksctl create nodegroup 2>&1", 1)
|
|
end
|
|
end
|