39 lines
1.4 KiB
Ruby
39 lines
1.4 KiB
Ruby
class Glooctl < Formula
|
|
desc "Envoy-Powered API Gateway"
|
|
homepage "https://docs.solo.io/gloo/latest/"
|
|
url "https://github.com/solo-io/gloo.git",
|
|
tag: "v1.4.12",
|
|
revision: "f8a754a6af62066452431ddae28ddc9181187b9e"
|
|
license "Apache-2.0"
|
|
head "https://github.com/solo-io/gloo.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "5b66c5af7a76d33974063619309ac62b05312dd5e434201fae018964c222d2fc" => :catalina
|
|
sha256 "431419f49f645061bf44097e50cd86506afae7d7ccfeee27ccbb0140973186da" => :mojave
|
|
sha256 "1a38818a655c7e043dbb7d022611c65789124b58877240c77d0c7c5145d94915" => :high_sierra
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
def install
|
|
system "make", "glooctl", "TAGGED_VERSION=v#{version}"
|
|
bin.install "_output/glooctl"
|
|
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 "Client: {\"version\":\"#{version}\"}", version_output
|
|
|
|
version_output = shell_output("#{bin}/glooctl version 2>&1")
|
|
assert_match "Server: version undefined", 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 kube client", status_output
|
|
end
|
|
end
|