2017-11-07 17:30:48 +00:00
|
|
|
class Calicoctl < Formula
|
|
|
|
desc "Calico CLI tool"
|
|
|
|
homepage "https://www.projectcalico.org"
|
|
|
|
url "https://github.com/projectcalico/calicoctl.git",
|
2018-04-20 05:41:31 +00:00
|
|
|
:tag => "v3.1.1",
|
|
|
|
:revision => "8631831045acf28ea1fc622744112029a7229293"
|
2017-11-07 17:30:48 +00:00
|
|
|
|
2018-02-14 15:55:14 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2018-04-07 02:09:00 +00:00
|
|
|
sha256 "b8f1e55d3130b2ed31139a2817c3115547c3353ced86d708172a14dabe2d972b" => :high_sierra
|
|
|
|
sha256 "78861d9b05223d20c2f61e58f22afabee6afd4558003e19d1adefa38e13f871d" => :sierra
|
|
|
|
sha256 "0045f8f6274b86c72b6795a09ba17d988c7c655e3a7b8ca6ddf211cae69cf2a8" => :el_capitan
|
2018-02-14 15:55:14 +00:00
|
|
|
end
|
|
|
|
|
2017-11-07 17:30:48 +00:00
|
|
|
depends_on "glide" => :build
|
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
|
|
|
|
dir = buildpath/"src/github.com/projectcalico/calicoctl"
|
|
|
|
dir.install buildpath.children
|
|
|
|
cd dir do
|
|
|
|
system "glide", "install", "-strip-vendor"
|
|
|
|
system "make", "binary"
|
|
|
|
bin.install "dist/calicoctl-darwin-amd64" => "calicoctl"
|
|
|
|
prefix.install_metafiles
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2018-04-07 00:32:12 +00:00
|
|
|
assert_match version.to_s, shell_output("#{bin}/calicoctl version", 1)
|
2017-11-07 17:30:48 +00:00
|
|
|
end
|
|
|
|
end
|