Created
October 29, 2019 02:26
-
-
Save aahmed-se/02de9aa85988ce5257f9bc2cbcc24f4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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