aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorRadek Simko2015-02-02 12:51:46 +0000
committerMike McQuaid2015-02-22 15:41:14 +0000
commit9b58094196d4b83380c4688cb72bd7658de19f6b (patch)
treebdcd47eaa9d195a80abd8f6e829c329a6c867598 /Library/Formula
parent070f3499c31186cdb8262ca444e85893fb8cd055 (diff)
downloadhomebrew-9b58094196d4b83380c4688cb72bd7658de19f6b.tar.bz2
kubernetes-cli 0.10.1 (new formulae)
Closes #36462. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/kubernetes-cli.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Formula/kubernetes-cli.rb b/Library/Formula/kubernetes-cli.rb
new file mode 100644
index 000000000..003ed392e
--- /dev/null
+++ b/Library/Formula/kubernetes-cli.rb
@@ -0,0 +1,22 @@
+class KubernetesCli < Formula
+ homepage "http://kubernetes.io/"
+ url "https://github.com/GoogleCloudPlatform/kubernetes/archive/v0.10.1.tar.gz"
+ sha256 "76000917bae4d8002884f24d33aa3ed23938fd1e39e89c73b8dfdd2d9c06fe24"
+
+ depends_on "go" => :build
+
+ def install
+ arch = MacOS.prefer_64_bit? ? "amd64" : "x86"
+
+ system "make", "all", "WHAT=cmd/*", "GOFLAGS=-v"
+
+ dir = "_output/local/bin/darwin/#{arch}"
+ bin.install "#{dir}/kubecfg", "#{dir}/kubectl", "#{dir}/kubernetes"
+ end
+
+ test do
+ assert_match /^Usage: kubecfg/, shell_output("#{bin}/kubecfg 2>&1", 1)
+ assert_match /^kubectl controls the Kubernetes cluster manager./, shell_output("#{bin}/kubectl 2>&1", 0)
+ assert_match %r{^Usage of #{bin}/kubernetes:}, shell_output("#{bin}/kubernetes --help 2>&1", 2)
+ end
+end