42 lines
1.5 KiB
Ruby
42 lines
1.5 KiB
Ruby
class Glooctl < Formula
|
|
desc "Envoy-Powered API Gateway"
|
|
homepage "https://gloo.solo.io"
|
|
url "https://github.com/solo-io/gloo.git",
|
|
:tag => "v0.18.23",
|
|
:revision => "0f1f6b3a85ed67b0659c64453c5288c905082c39"
|
|
head "https://github.com/solo-io/gloo.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "f139f4fc6bb93974daec9f143431025c5ce97aedab19f05f87c2880b37ffdb10" => :mojave
|
|
sha256 "cb0eddb9b8467f639a2f4ea0eb8f668e6b33e79b7aabfd08d72cbd6cee952d2d" => :high_sierra
|
|
sha256 "ec1d26043b071cf1ecc14ee863c73ad554548c84ad69170a87da45fbbdf109cd" => :sierra
|
|
end
|
|
|
|
depends_on "dep" => :build
|
|
depends_on "go" => :build
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
dir = buildpath/"src/github.com/solo-io/gloo"
|
|
dir.install buildpath.children - [buildpath/".brew_home"]
|
|
|
|
cd dir do
|
|
system "dep", "ensure", "-vendor-only"
|
|
system "make", "glooctl", "TAGGED_VERSION=v#{version}"
|
|
bin.install "_output/glooctl"
|
|
end
|
|
end
|
|
|
|
test do
|
|
run_output = shell_output("#{bin}/glooctl 2>&1")
|
|
assert_match "glooctl is the unified CLI for Gloo.", run_output
|
|
|
|
version_output = shell_output("#{bin}/glooctl --version 2>&1")
|
|
assert_match "glooctl community edition version #{version}", version_output
|
|
|
|
# Should error out as it needs access to a Kubernetes cluster to operate correctly
|
|
status_output = shell_output("#{bin}/glooctl get proxy 2>&1", 1)
|
|
assert_match "failed to create proxy client", status_output
|
|
end
|
|
end
|