The formula above is based on kubernetes-helm.rb 2.11.0
brew unlink kubernetes-helm
brew install <raw link from this gist>
brew switch kubernetes-helm
to list out available versionsbrew switch kubernetes-helm <version>
to switch to it
The formula above is based on kubernetes-helm.rb 2.11.0
brew unlink kubernetes-helm
brew install <raw link from this gist>
brew switch kubernetes-helm
to list out available versionsbrew switch kubernetes-helm <version>
to switch to itclass 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 "68294dc3abb779233fdbfa14648aaa06ea78ff63b7484716d39ed8b280d4a18a" => :high_sierra | |
sha256 "c5c53af3256aa619058e7ab1d265ed4fb54d7dacc80a455de7df6e43176da310" => :sierra | |
sha256 "987174d800b65c9350e198152cf05a5f605f49149da382d81c39b8e6da2c97e5" => :el_capitan | |
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 = "amd64" | |
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 |