etcd: remove gopath

Closes #47687.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
This commit is contained in:
Caleb Xu 2019-12-10 08:14:42 -05:00 committed by Rui Chen
parent 7069404420
commit 95a16b250c

View file

@ -16,16 +16,9 @@ class Etcd < Formula
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
dir = buildpath/"src/github.com/etcd-io/etcd"
dir.install buildpath.children
cd dir do
system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"etcd"
system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"etcdctl", "etcdctl/main.go"
prefix.install_metafiles
end
system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", "-o", bin/"etcd"
system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", "-o", bin/"etcdctl", "etcdctl/main.go"
prefix.install_metafiles
end
plist_options :manual => "etcd"