class Helm < Formula desc "The Kubernetes package manager" homepage "https://helm.sh/" url "https://github.com/helm/helm.git", :tag => "v3.0.1", :revision => "7c22ef9ce89e0ebeb7125ba2ebf7d421f3e82ffa" head "https://github.com/helm/helm.git" bottle do cellar :any_skip_relocation sha256 "ea598eaa6bd98765f32d556b700d80b18e0cadec0b378b1c12f02f2602d5983a" => :catalina sha256 "b981fac0003ad39b7a4f187563ccb5668e52272146745a1a315e5f794ee19271" => :mojave sha256 "312e69ab0ecaff681f03d69d975456e670ba4c9331ae43d60c5b75c8f868790f" => :high_sierra end 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/helm.sh/helm" dir.install buildpath.children - [buildpath/".brew_home"] cd dir do system "make", "build" bin.install "bin/helm" 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 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