45 lines
1.4 KiB
Ruby
45 lines
1.4 KiB
Ruby
class Minikube < Formula
|
|
desc "Run a Kubernetes cluster locally"
|
|
homepage "https://minikube.sigs.k8s.io/"
|
|
url "https://github.com/kubernetes/minikube.git",
|
|
tag: "v1.12.3",
|
|
revision: "2243b4b97c131e3244c5f014faedca0d846599f5"
|
|
license "Apache-2.0"
|
|
head "https://github.com/kubernetes/minikube.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "eea174b37eb1d6a3f740d0d584f5f30a22895c178d2617a61edd37e77e1dace8" => :catalina
|
|
sha256 "1620f78a138602df2ef42bffde3e9bef7c7df3de3884f2818864f45be8b651c0" => :mojave
|
|
sha256 "00b35e0cd6042a3a794ef11c273a7ee4a4770e11c71ec01ca123793377721c45" => :high_sierra
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "go-bindata" => :build
|
|
depends_on "kubernetes-cli"
|
|
|
|
def install
|
|
system "make"
|
|
bin.install "out/minikube"
|
|
|
|
output = Utils.safe_popen_read("#{bin}/minikube", "completion", "bash")
|
|
(bash_completion/"minikube").write output
|
|
|
|
output = Utils.safe_popen_read("#{bin}/minikube", "completion", "zsh")
|
|
(zsh_completion/"_minikube").write output
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{bin}/minikube version")
|
|
assert_match "version: v#{version}", output
|
|
|
|
(testpath/".minikube/config/config.json").write <<~EOS
|
|
{
|
|
"vm-driver": "virtualbox"
|
|
}
|
|
EOS
|
|
output = shell_output("#{bin}/minikube config view")
|
|
assert_match "vm-driver: virtualbox", output
|
|
end
|
|
end
|