From 41c2e73da270a3249862a2e98023dbbb64f52a82 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Sun, 11 Jun 2017 10:30:35 -0700 Subject: [PATCH] Support Bazel 0.5.1 Bazel 0.5.1 is using "bazel-out/darwin_x86_64-fastbuild/", which failed these extraction patterns. Allow anything before the -fastbuild part of the path. Change-Id: I850271bb1c657a5ffe77946a6beaf54a3680af75 --- tools/eclipse/project.py | 2 +- tools/js/bower2bazel.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py index 6838101af0..97c2b12b3f 100755 --- a/tools/eclipse/project.py +++ b/tools/eclipse/project.py @@ -139,7 +139,7 @@ def gen_classpath(ext): plugins = set() # Classpath entries are absolute for cross-cell support - java_library = re.compile('bazel-out/local-fastbuild/bin/(.*)/[^/]+[.]jar$') + java_library = re.compile('bazel-out/.*?-fastbuild/bin/(.*)/[^/]+[.]jar$') srcs = re.compile('(.*/external/[^/]+)/jar/(.*)[.]jar') for p in _query_classpath(MAIN): if p.endswith('-src.jar'): diff --git a/tools/js/bower2bazel.py b/tools/js/bower2bazel.py index d12129e1f0..fa928de70e 100755 --- a/tools/js/bower2bazel.py +++ b/tools/js/bower2bazel.py @@ -76,7 +76,7 @@ def build_bower_json(version_targets, seeds): seeds = set(seeds) for v in version_targets: - fn = os.path.join("bazel-out/local-fastbuild/bin", v.lstrip("/").replace(":", "/")) + fn = os.path.join("bazel-out/.*?-fastbuild/bin", v.lstrip("/").replace(":", "/")) with open(fn) as f: j = json.load(f) if "" in j: