2015-02-02 12:51:46 +00:00
|
|
|
class KubernetesCli < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Command-line tool for kubernetes, a cluster manager for Docker"
|
2015-02-02 12:51:46 +00:00
|
|
|
homepage "http://kubernetes.io/"
|
2015-05-29 19:53:17 +00:00
|
|
|
url "https://github.com/GoogleCloudPlatform/kubernetes/archive/v0.17.1.tar.gz"
|
|
|
|
sha256 "24d0109a3c9eb5fef394508c7effd6610f8e2e025a87060d76ddba73086b9050"
|
2015-06-17 10:37:56 +00:00
|
|
|
head "https://github.com/GoogleCloudPlatform/kubernetes.git"
|
2015-02-02 12:51:46 +00:00
|
|
|
|
2015-02-21 22:47:34 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-29 20:20:02 +00:00
|
|
|
sha256 "f01000218846ad7a3247492c29dd0dbd1862486b4b5deefbbf5c4e2f8e06d0fc" => :yosemite
|
|
|
|
sha256 "4c5f86844a6f0e863870b98d1512f5f5291bd4c3ac22ec458f2e5f47ed62878b" => :mavericks
|
|
|
|
sha256 "7367b8334633201580674dbe8b2d44207ab07099a95e3fd9acb67845329a0540" => :mountain_lion
|
2015-02-21 22:47:34 +00:00
|
|
|
end
|
|
|
|
|
2015-02-02 12:51:46 +00:00
|
|
|
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}"
|
2015-02-27 23:11:30 +00:00
|
|
|
bin.install "#{dir}/kubectl", "#{dir}/kubernetes"
|
2015-02-02 12:51:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
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
|