homebrew-core/Formula/minikube.rb

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.1",
revision: "5664228288552de9f3a446ea4f51c6f29bbdd0e0"
license "Apache-2.0"
head "https://github.com/kubernetes/minikube.git"
bottle do
cellar :any_skip_relocation
sha256 "84aa48991e5a90287fe9bdb52ccd9c936b29446a0bac701d8a518c88562ab6f7" => :catalina
sha256 "a2c0efddddd1ad734a6b24ab9380e7a5718e169e48f7ff35cbc5fd9f85db96a2" => :mojave
sha256 "419d870347183de062fb01c36386ff106b5c7c0f78432fd5f39586614609fe89" => :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