gloo-ctl 0.8.3 (new formula)
Closes #37436. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
bbf164a3c7
commit
1943d2af67
1 changed files with 34 additions and 0 deletions
34
Formula/gloo-ctl.rb
Normal file
34
Formula/gloo-ctl.rb
Normal file
|
@ -0,0 +1,34 @@
|
|||
class GlooCtl < Formula
|
||||
desc "Envoy-Powered API Gateway"
|
||||
homepage "https://gloo.solo.io"
|
||||
url "https://github.com/solo-io/gloo.git",
|
||||
:tag => "v0.8.3",
|
||||
:revision => "0e749d0fd9b41f8606dca85b70f0a9981cb0d5ca"
|
||||
|
||||
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}", "RELEASE=false"
|
||||
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 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
|
Loading…
Reference in a new issue