From 95a16b250cc19234cfd54b1542c79e8080670825 Mon Sep 17 00:00:00 2001 From: Caleb Xu Date: Tue, 10 Dec 2019 08:14:42 -0500 Subject: [PATCH] etcd: remove gopath Closes #47687. Signed-off-by: Rui Chen --- Formula/etcd.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Formula/etcd.rb b/Formula/etcd.rb index 02548d90c1..4ca3edfc0b 100644 --- a/Formula/etcd.rb +++ b/Formula/etcd.rb @@ -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"