49 lines
1.7 KiB
Ruby
49 lines
1.7 KiB
Ruby
class KubernetesHelm < Formula
|
|
desc "The Kubernetes package manager"
|
|
homepage "https://helm.sh/"
|
|
url "https://github.com/kubernetes/helm.git",
|
|
:tag => "v2.10.0",
|
|
:revision => "9ad53aac42165a5fadc6c87be0dea6b115f93090"
|
|
head "https://github.com/kubernetes/helm.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "68294dc3abb779233fdbfa14648aaa06ea78ff63b7484716d39ed8b280d4a18a" => :high_sierra
|
|
sha256 "c5c53af3256aa619058e7ab1d265ed4fb54d7dacc80a455de7df6e43176da310" => :sierra
|
|
sha256 "987174d800b65c9350e198152cf05a5f605f49149da382d81c39b8e6da2c97e5" => :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
|