chamber: remove gopath

Closes #47671.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
This commit is contained in:
Caleb Xu 2019-12-10 01:23:09 -05:00 committed by Rui Chen
parent 1c61bfe9c0
commit 7c1b3072bf

View file

@ -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