homebrew-core/Formula/kubernetes-helm.rb
Kenny Younger a55a387ba0 kubernetes-helm 2.13.0
Closes #37404.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2019-02-28 09:51:01 +01:00

54 lines
1.8 KiB
Ruby

class KubernetesHelm < Formula
desc "The Kubernetes package manager"
homepage "https://helm.sh/"
url "https://github.com/helm/helm.git",
:tag => "v2.13.0",
:revision => "79d07943b03aea2b76c12644b4b54733bc5958d6"
head "https://github.com/helm/helm.git"
bottle do
cellar :any_skip_relocation
sha256 "61b1f0e2420be11409aa4f0414f737fbf31171e2079bbbfc2b0be52277b85244" => :mojave
sha256 "8a435df0705a800924f3ab4fda8d8015639d6bdbae09fced34975506d3b03fc8" => :high_sierra
sha256 "744825a4249f3acee88d7484e116fa4ec66f7e20d284fe6bae71aaaa12500774" => :sierra
end
depends_on "glide" => :build
depends_on "go" => :build
depends_on "mercurial" => :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