homebrew-core/Formula/minikube.rb
2019-10-31 22:10:59 -04:00

43 lines
1.3 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.5.2",
:revision => "792dbf92a1de583fcee76f8791cff12e0c9440ad"
head "https://github.com/kubernetes/minikube.git"
bottle do
cellar :any_skip_relocation
sha256 "6cab6126b65a45912587339eddf252729e4ad16b4bfd327454204b462b9927dd" => :catalina
sha256 "4cf3836df30546744ecaf0514c22b041142e49f29e4c7ae74eff4e49b9d777ff" => :mojave
sha256 "5c5d913c4cd18463ab10384d35fc59624e678874d8219cbc5af3b88a17eb89d8" => :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.popen_read("#{bin}/minikube completion bash")
(bash_completion/"minikube").write output
output = Utils.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