homebrew-core/Formula/helm.rb
2019-11-16 10:50:13 +01:00

50 lines
1.6 KiB
Ruby

class Helm < Formula
desc "The Kubernetes package manager"
homepage "https://helm.sh/"
url "https://github.com/helm/helm.git",
:tag => "v3.0.0",
:revision => "e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6"
head "https://github.com/helm/helm.git"
bottle do
cellar :any_skip_relocation
sha256 "20505dc4eff86956bedf180a8703ace8671fb1a9e1159c7617983330daf10d47" => :catalina
sha256 "4bdc858b036df97b65e62168506232084d056536438d755f676e2f8d51e99de6" => :mojave
sha256 "67e98c512b73b5bc99ef3d6fe8c58a397fadfd09e8697b2aeccb463977c2a6d4" => :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