class KubernetesHelm < Formula desc "The Kubernetes package manager" homepage "https://helm.sh/" url "https://github.com/kubernetes/helm.git", :tag => "v2.7.0", :revision => "08c1144f5eb3e3b636d9775617287cc26e53dba4" head "https://github.com/kubernetes/helm.git" bottle do cellar :any_skip_relocation sha256 "1ecf10a071f7f2d63e885ea82ec30eababc42be3796fcd95e7f15803e947773a" => :high_sierra sha256 "763a4ca21914b5388c5576869e1f3afd620f0d913174edac4923071f5080026f" => :sierra sha256 "9bd7a2db55a057cbcccef388c89c9e10558f4dff8168c1b2dc3b704d227952f2" => :el_capitan end depends_on :hg => :build depends_on "go" => :build depends_on "glide" => :build def install ENV["GOPATH"] = buildpath ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}" ENV.prepend_create_path "PATH", buildpath/"bin" arch = MacOS.prefer_64_bit? ? "amd64" : "x86" ENV["TARGETS"] = "darwin/#{arch}" 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/*"] bash_completion.install "scripts/completions.bash" => "helm" 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