Created
March 12, 2019 10:58
-
-
Save ethe/491e8598bb14144c9e2daba6b6494c08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class KubernetesHelm < Formula | |
| desc "The Kubernetes package manager" | |
| homepage "https://helm.sh/" | |
| url "https://github.com/kubernetes/helm.git", | |
| :tag => "v2.9.1", | |
| :revision => "20adb27c7c5868466912eebdf6664e7390ebe710" | |
| head "https://github.com/kubernetes/helm.git" | |
| bottle do | |
| cellar :any_skip_relocation | |
| sha256 "ba6cd1ad800a7c27673c049a64317205a7efdf697ef05bdca9b2c05462774c19" => :high_sierra | |
| sha256 "3d2bcc34ce4f4abfa6a2eca7dd0082383f4bc7ca06178b976f1d231998c4e506" => :sierra | |
| sha256 "67d20f520869e4c015b712dca3869f9e9ccc6efb37446bba966e2482d2d424ec" => :el_capitan | |
| end | |
| depends_on "mercurial" => :build | |
| depends_on "go" => :build | |
| depends_on "glide" => :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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment