class KubernetesHelm < Formula desc "The Kubernetes package manager" homepage "https://helm.sh/" url "https://github.com/helm/helm.git", :tag => "v2.14.2", :revision => "a8b13cc5ab6a7dbef0a58f5061bcc7c0c61598e7" head "https://github.com/helm/helm.git" bottle do cellar :any_skip_relocation sha256 "4636fdf315393667e37330aadff7f7a9498c76984f2d98c70f4217f360daccb5" => :mojave sha256 "c35603f4cbe582fde53ce387bd45ee8e5d97cc860a0df7005c76b3ad853f5ac3" => :high_sierra sha256 "ce6b290831faf3bd20f913a69e46a758c89bf875e84b319f28ca33c5cc900737" => :sierra end depends_on "glide" => :build depends_on "go" => :build def install ENV["GOPATH"] = buildpath ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" ENV.prepend_create_path "PATH", buildpath/"bin" ENV["TARGETS"] = "darwin/amd64" dir = buildpath/"src/k8s.io/helm" dir.install buildpath.children - [buildpath/".brew_home"] cd dir do system "make", "bootstrap" system "make", "build" bin.install "bin/helm" bin.install "bin/tiller" man1.install Dir["docs/man/man1/*"] output = Utils.popen_read("SHELL=bash #{bin}/helm completion bash") (bash_completion/"helm").write output output = Utils.popen_read("SHELL=zsh #{bin}/helm completion zsh") (zsh_completion/"_helm").write output prefix.install_metafiles end end test do system "#{bin}/helm", "create", "foo" assert File.directory? "#{testpath}/foo/charts" version_output = shell_output("#{bin}/helm version --client 2>&1") assert_match "GitTreeState:\"clean\"", version_output assert_match stable.instance_variable_get(:@resource).instance_variable_get(:@specs)[:revision], version_output if build.stable? end end