Skip to content

Instantly share code, notes, and snippets.

@sonthonaxrk
Created October 2, 2019 12:20
Show Gist options
  • Save sonthonaxrk/c772887064b42047d919720445a32fe3 to your computer and use it in GitHub Desktop.
Save sonthonaxrk/c772887064b42047d919720445a32fe3 to your computer and use it in GitHub Desktop.
2.11.0 Helm Homebrew
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 "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"
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/*"]
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
@sonthonaxrk
Copy link
Author

Because the old version won't actually build...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment