class Istioctl < Formula desc "Istio configuration command-line utility" homepage "https://github.com/istio/istio" url "https://github.com/istio/istio/archive/1.0.5.tar.gz" sha256 "48418c5f27ef61403aea79ea57c502cec426117a5de4db713cd3691e2bf91204" depends_on "go" => :build def install ENV["GOPATH"] = buildpath ENV["TAG"] = version.to_s srcpath = buildpath/"src/istio.io/istio" outpath = buildpath/"out/darwin_amd64/release" srcpath.install buildpath.children cd srcpath do system "make", "istioctl" prefix.install_metafiles bin.install outpath/"istioctl" end end test do assert_match "Retrieve policies and rules", shell_output("#{bin}/istioctl get -h") end end