Skip to content

Commit

Permalink
chore: update to bazel 2.2 (bazel-contrib#1691)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored Mar 6, 2020
1 parent f9be953 commit 62ef39d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
bazel: 2.1.1
bazel: 2.2.0
tasks:
ubuntu1604:
name: ubuntu1604
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.1
2.2.0
2 changes: 1 addition & 1 deletion index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ VERSION = "1.4.0"
# against.
# This version should be updated together with the version of the Bazel
# in .bazelversion. This is asserted in //internal:bazel_version_test.
BAZEL_VERSION = "2.1.1"
BAZEL_VERSION = "2.2.0"

# Versions of Bazel which users should be able to use.
# Ensures we don't break backwards-compatibility,
Expand Down
5 changes: 4 additions & 1 deletion internal/npm_install/generate_build_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,11 @@ def _maybe(repo_rule, name, **kwargs):
// root of the external repository, and won't see BUILD files under node_modules
// This parsing of the version number isn't accurate in some cases
// (eg. install bazel from commit hash)
if (BAZEL_VERSION.startsWith('2.1'))
// Do a cheap semver check that the major version is at least 2.1
// (we don't want to depend on a third-party library like semver here)
if (Number(BAZEL_VERSION.split('.')[0]) >= 2 && !BAZEL_VERSION.startsWith('2.0')) {
hide = false;
}
if (fs.lstatSync(f).isSymbolicLink()) {
hide = false;
}
Expand Down
6 changes: 5 additions & 1 deletion internal/npm_install/generate_build_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,11 @@ function findPackages(p = 'node_modules') {
// root of the external repository, and won't see BUILD files under node_modules
// This parsing of the version number isn't accurate in some cases
// (eg. install bazel from commit hash)
if (BAZEL_VERSION.startsWith('2.1')) hide = false;
// Do a cheap semver check that the major version is at least 2.1
// (we don't want to depend on a third-party library like semver here)
if (Number(BAZEL_VERSION.split('.')[0]) >= 2 && !BAZEL_VERSION.startsWith('2.0')) {
hide = false;
}
if (fs.lstatSync(f).isSymbolicLink()) {
hide = false;
}
Expand Down

0 comments on commit 62ef39d

Please sign in to comment.