57 lines
1.7 KiB
Ruby
57 lines
1.7 KiB
Ruby
class HelmAT2 < Formula
|
|
desc "The Kubernetes package manager"
|
|
homepage "https://helm.sh/"
|
|
url "https://github.com/helm/helm.git",
|
|
:tag => "v2.16.3",
|
|
:revision => "1ee0254c86d4ed6887327dabed7aa7da29d7eb0d"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "335da9e7cd9c44c7190425f37a1aeec376aee63370e8b563483dbf5cde8cb40e" => :catalina
|
|
sha256 "8d5b557f8102443e5a01d2c031722775c1c815648e894b8644515e25890fdac5" => :mojave
|
|
sha256 "51ddd1349b7f5d656fe5a9250303edfa26796ed1ad5cd81228c5a311f42288d5" => :high_sierra
|
|
end
|
|
|
|
keg_only :versioned_formula
|
|
|
|
depends_on "glide" => :build
|
|
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/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
|
|
if build.stable?
|
|
assert_match stable.instance_variable_get(:@resource).instance_variable_get(:@specs)[:revision], version_output
|
|
end
|
|
end
|
|
end
|