Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bazel.rb to version 0.16.1 #31066

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Formula/bazel.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Bazel < Formula
desc "Google's own build tool"
homepage "https://bazel.build/"
url "https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel-0.15.2-dist.zip"
sha256 "bf53ec73be3a6d412d85ef612cec6e9c85db45da42001fab0cf1dad44cfc03f1"
url "https://releases.bazel.build/0.16.1/release/bazel-0.16.1-dist.zip"
sha256 "09c66b94356c82c52f212af52a81ac28eb06de1313755a2f23eeef84d167b36c"

bottle do
cellar :any_skip_relocation
Expand All @@ -11,7 +11,9 @@ class Bazel < Formula
sha256 "4edb4d88f886980bc1933be3fe9f704bc48fc1663e74c3fadb49ce7333d4642a" => :el_capitan
end

depends_on :java => "1.8"
depends_on "zip" => :build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see from the previous PR these are only necessary on certain versions of macOS? We should scope them accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case that would mean simply changing this line to:
depends_on "zip" => :build if MacOS.version <= :el_capitan

(if 10.11 and later are the platforms that need zip.)

depends_on "unzip" => :build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you scope this dependency the same way the zip dependency is scoped?

depends_on :java => "1.9+"
depends_on :macos => :yosemite

def install
Expand All @@ -28,7 +30,7 @@ def install

bin.install "scripts/packages/bazel.sh" => "bazel"
bin.install "output/bazel" => "bazel-real"
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8"))
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.9+"))

bash_completion.install "bazel-bin/scripts/bazel-complete.bash"
zsh_completion.install "scripts/zsh_completion/_bazel"
Expand Down