From 7c1b3072bf33400ab67d8b0663773dafde1a0df5 Mon Sep 17 00:00:00 2001 From: Caleb Xu Date: Tue, 10 Dec 2019 01:23:09 -0500 Subject: [PATCH] chamber: remove gopath Closes #47671. Signed-off-by: Rui Chen --- Formula/chamber.rb | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Formula/chamber.rb b/Formula/chamber.rb index 0e22a19e31..eca29d94c2 100644 --- a/Formula/chamber.rb +++ b/Formula/chamber.rb @@ -13,23 +13,10 @@ class Chamber < Formula end depends_on "go" => :build - depends_on "govendor" => :build def install - ENV["GOPATH"] = buildpath - ENV["GOOS"] = "darwin" - ENV["GOARCH"] = "amd64" - ENV["CGO_ENABLED"] = "0" - - path = buildpath/"src/github.com/segmentio/chamber" - path.install Dir["{*,.git}"] - - cd "src/github.com/segmentio/chamber" do - system "govendor", "sync" - system "go", "build", "-o", bin/"chamber", - "-ldflags", "-X main.Version=#{version}" - prefix.install_metafiles - end + system "go", "build", "-ldflags", "-s -w -X main.Version=#{version}", "-trimpath", "-o", bin/"chamber" + prefix.install_metafiles end test do