From 240d2223b4d48453f8385bfa17630385f809387e Mon Sep 17 00:00:00 2001 From: Damien Martin-Guillerez Date: Fri, 29 Jul 2016 12:17:50 +0200 Subject: [PATCH] bazel 0.3.1 - use BAZEL_WRKDIR to put generated files in buildpath/"work" - output root of second Bazel run set to buildpath/"output_user_root" - install the wrapper script along with Bazel Closes #3427. Signed-off-by: ilovezfs --- Formula/bazel.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Formula/bazel.rb b/Formula/bazel.rb index 4036bd71aa4..f2ae09b4aca 100644 --- a/Formula/bazel.rb +++ b/Formula/bazel.rb @@ -1,8 +1,8 @@ class Bazel < Formula desc "Google's own build tool" homepage "http://www.bazel.io/" - url "https://github.com/bazelbuild/bazel/archive/0.3.0.tar.gz" - sha256 "d2309c29781dc4ede79eb652776517ca3c1dff29b58849dc80bdb86031cce3ad" + url "https://github.com/bazelbuild/bazel/archive/0.3.1.tar.gz" + sha256 "52beafc9d78fc315115226f31425e21df1714d96c7dfcdeeb02306e2fe028dd8" head "https://github.com/bazelbuild/bazel.git" bottle do @@ -16,11 +16,15 @@ class Bazel < Formula def install ENV["EMBED_LABEL"] = "#{version}-homebrew" + # Force Bazel ./compile.sh to put its temporary files in the buildpath + ENV["BAZEL_WRKDIR"] = buildpath/"work" system "./compile.sh" - system "./output/bazel", "build", "scripts:bash_completion" + system "./output/bazel", "--output_user_root", buildpath/"output_user_root", + "build", "scripts:bash_completion" - bin.install "output/bazel" => "bazel" + bin.install "scripts/packages/bazel.sh" => "bazel" + bin.install "output/bazel" => "bazel-real" bash_completion.install "bazel-bin/scripts/bazel-complete.bash" zsh_completion.install "scripts/zsh_completion/_bazel" end @@ -44,7 +48,7 @@ class Bazel < Formula ) EOS - system "#{bin}/bazel", "build", "//:bazel-test" + system bin/"bazel", "build", "//:bazel-test" system "bazel-bin/bazel-test" end end