homebrew-core/Formula/glooctl.rb
Scott Cranton 8429e81c12
glooctl: add head version url
Closes #38504.

Signed-off-by: Izaak Beekman <zbeekman@gmail.com>
2019-04-08 20:29:40 -04:00

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.13.7",
:revision => "6f52c7c8afa0249c7887c0ed4376feb922db53aa"
head "https://github.com/solo-io/gloo.git"
bottle do
cellar :any_skip_relocation
sha256 "22657c8f01b2a0918d987b42375d80dfa612eeca615fa7269dc24a2d8d7f478a" => :mojave
sha256 "87b17f9184c88ecf80597118226fe6a65cfe08fc5da152907d14309e11c9e86b" => :high_sierra
sha256 "acb7586bc32e57f4bc0df1d3838705f7a1d3bae98174e321d36a21c8cbf33cb9" => :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