homebrew-core/Formula/eksctl.rb

43 lines
1.4 KiB
Ruby

class Eksctl < Formula
desc "Simple command-line tool for creating clusters on Amazon EKS"
homepage "https://eksctl.io"
url "https://github.com/weaveworks/eksctl.git",
tag: "0.30.0",
revision: "2e813021c58e31920d7d3652fd5c5184b553f4b8"
license "Apache-2.0"
head "https://github.com/weaveworks/eksctl.git"
bottle do
cellar :any_skip_relocation
sha256 "95d7731ea3766d16793e65fffb9273d4c0915f1859476f120daed9e4a4d787ba" => :catalina
sha256 "0af8a4b8725474eeeec08b314032e53ae5362613aa2b8a8c5748e89b26104924" => :mojave
sha256 "4ab15c9e0466265b99f54aa5bbc672ff948a91b4ceb529ad8dd6c1264e782a88" => :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