homebrew-core/Formula/kubernetes-helm.rb
2018-11-04 11:48:04 +00:00

49 lines
1.7 KiB
Ruby

class KubernetesHelm < Formula
desc "The Kubernetes package manager"
homepage "https://helm.sh/"
url "https://github.com/helm/helm.git",
:tag => "v2.11.0",
:revision => "2e55dbe1fdb5fdb96b75ff144a339489417b146b"
head "https://github.com/helm/helm.git"
bottle do
cellar :any_skip_relocation
sha256 "fc5e215fd3086a1d005f9203b7c2f5dc138a05e43f182a0786594f159d584754" => :mojave
sha256 "66b4b85d1dfb9e8f92f13e5df1d2603a6ac0b61f8e0e7169621df376f56f4106" => :high_sierra
sha256 "5f0060fea0a43d72155835f808d000e96f807c96d5b82acb571ea951e3242c54" => :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"
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