54 lines
1.8 KiB
Ruby
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 "dd868f7d8c5c7f54c0052fdfcaa8c73a278162026c66d24d653457a58a52fc93" => :mojave
|
|
sha256 "8af0800b2eb2d549d901d94fa4985439267410a40106ecbb216cc886a1e8be3e" => :high_sierra
|
|
sha256 "95f80024bdbf993598a806c4de10ecf6a7389493779b9369824892423fca0440" => :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
|