Skip to content

Instantly share code, notes, and snippets.

@aahmed-se
Created October 29, 2019 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aahmed-se/02de9aa85988ce5257f9bc2cbcc24f4b to your computer and use it in GitHub Desktop.
Save aahmed-se/02de9aa85988ce5257f9bc2cbcc24f4b to your computer and use it in GitHub Desktop.
class Pulsarctl < Formula
desc "Pulsar admin go cli"
homepage "https://github.com/streamnative/pulsarctl"
url "https://github.com/streamnative/pulsarctl/archive/v0.1.0.tar.gz"
version "v0.1.0"
sha256 "780e97f5f7a744525ffbb0e68d8e658837bee998269b72456711f034b1532e7d"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
ENV["GO111MODULE"] = "on"
srcpath = buildpath/"src/github.com/streamnative/pulsarctl"
srcpath.install buildpath.children
cd srcpath do
system "go", "mod", "download"
system "go", "build", "-o", bin/"pulsarctl"
prefix.install_metafiles
end
end
test do
system "#{bin}/pulsarctl", "version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment