nats-streaming-server: remove gopath

Closes #48071.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
This commit is contained in:
Caleb Xu 2019-12-19 10:32:33 -05:00 committed by Rui Chen
parent 3d743e876b
commit c049d07db8

View file

@ -16,12 +16,8 @@ class NatsStreamingServer < Formula
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
ENV["GO111MODULE"] = "off"
mkdir_p "src/github.com/nats-io"
ln_s buildpath, "src/github.com/nats-io/nats-streaming-server"
buildfile = buildpath/"src/github.com/nats-io/nats-streaming-server/nats-streaming-server.go"
system "go", "build", "-v", "-o", bin/"nats-streaming-server", buildfile
system "go", "build", "-ldflags", "-s -w", "-trimpath", "-o", bin/"nats-streaming-server"
prefix.install_metafiles
end
plist_options :manual => "nats-streaming-server"