2019-11-14 23:25:44 +00:00
|
|
|
class HelmAT2 < Formula
|
|
|
|
desc "The Kubernetes package manager"
|
|
|
|
homepage "https://helm.sh/"
|
|
|
|
url "https://github.com/helm/helm.git",
|
|
|
|
:tag => "v2.16.1",
|
|
|
|
:revision => "bbdfe5e7803a12bbdf97e94cd847859890cf4050"
|
|
|
|
|
2019-11-16 06:00:09 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "1450f1bdc13f6ac6f08c3edcefbdf0301a73d6158a8335b3fec68c32bf367d7c" => :catalina
|
|
|
|
sha256 "eedc16bde2576c3ddb4d02213154ad09951e5e65ec2d1a1ec1e451d6fa5108b2" => :mojave
|
|
|
|
sha256 "c9d3fe248f6231c860f7cc0226bea285284f7a8af82ee5d2d88e35c9c407fb0f" => :high_sierra
|
|
|
|
end
|
|
|
|
|
2019-11-14 23:25:44 +00:00
|
|
|
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
|
|
|
|
assert_match stable.instance_variable_get(:@resource).instance_variable_get(:@specs)[:revision], version_output if build.stable?
|
|
|
|
end
|
|
|
|
end
|