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-20 06:30:47 +00:00
|
|
|
sha256 "4c95ac500871e2a34dd3e3f883b7e0c2b547a3521b6517535d51a7287e598ae9" => :high_sierra
|
|
|
|
sha256 "26be8e07da7fff9a3fe92dfbc09f564f9c37b4723c9c788d6abd33334ce99268" => :sierra
|
|
|
|
sha256 "f3374dfd7fd96473c77c2c1ee7dc7c5f30d856c1e1ccdcaca3711cd36239e333" => :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
|