fortio: switch to Makefile build details

Closes #29091.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
Laurent Demailly 2018-06-15 15:32:38 -07:00 committed by ilovezfs
parent 0be9c5660b
commit df2f1e891f

View file

@ -18,11 +18,8 @@ class Fortio < Formula
(buildpath/"src/istio.io/fortio").install buildpath.children
cd "src/istio.io/fortio" do
date = Time.new.strftime("%Y-%m-%d %H:%M")
system "go", "build", "-a", "-o", bin/"fortio", "-ldflags",
"-s -X istio.io/fortio/ui.resourcesDir=#{lib} " \
"-X istio.io/fortio/version.tag=v#{version} " \
"-X \"istio.io/fortio/version.buildInfo=#{date}\""
system "make", "official-build", "GOOS=darwin",
"OFFICIAL_BIN=#{bin}/fortio", "LIB_DIR=#{lib}", "DATA_DIR=."
lib.install "ui/static", "ui/templates"
prefix.install_metafiles
end