Merge branch 'stable-2.15'
* stable-2.15:
[project.py] Add bazel --batch option
[project.py] Fix typo
Set Gerrit API version to 2.15-rc2
Change-Id: I6d83dfea5002f8837198a0b6086a1dc99a13df2e
diff --git a/gerrit_api.bzl b/gerrit_api.bzl
index cfe72c5..18a8332 100644
--- a/gerrit_api.bzl
+++ b/gerrit_api.bzl
@@ -5,7 +5,7 @@
gerrit_api is rule for fetching Gerrit plugin API using Bazel.
"""
-VER = "2.15-rc1"
+VER = "2.15-rc2"
def gerrit_api():
bouncycastle_repos()
@@ -13,17 +13,17 @@
maven_jar(
name = 'gerrit_plugin_api',
artifact = 'com.google.gerrit:gerrit-plugin-api:' + VER,
- sha1 = 'a448355a7fdfbace0e6e4f449c9a37aaa3a889f9',
+ sha1 = '94e790fe528717e8226a77f492d0a247f2add805',
)
maven_jar(
name = 'gerrit_plugin_gwtui',
artifact = 'com.google.gerrit:gerrit-plugin-gwtui:' + VER,
- sha1 = 'd2412bc6048294d2a3a5567d45788692631baa1a',
+ sha1 = '70a4f5fc469ed6fd09a912f92ec91d424649922d',
)
maven_jar(
name = 'gerrit_acceptance_framework',
artifact = 'com.google.gerrit:gerrit-acceptance-framework:' + VER,
- sha1 = '0870c05eaefa99bbfd0a873095d880d6398d43b0',
+ sha1 = '3ea95229d14c2a24a49356bbd06d67eae5e8a0f7',
)
native.bind(
name = 'gerrit-plugin-api',
diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py
index 6e694c6..8ae67c5 100755
--- a/tools/eclipse/project.py
+++ b/tools/eclipse/project.py
@@ -35,7 +35,9 @@
opts = OptionParser()
opts.add_option('-r', '--root', help='Root directory entry')
opts.add_option('-n', '--name', help='Project name')
-opts.add_option('-x', '--exclude', action='append', help='Exlude paths')
+opts.add_option('-x', '--exclude', action='append', help='Exclude paths')
+opts.add_option('-b', '--batch', action='store_true',
+ dest='batch', help='Bazel batch option')
args, _ = opts.parse_args()
if not args.root:
@@ -47,13 +49,23 @@
while not path.exists(path.join(ROOT, 'WORKSPACE')):
ROOT = path.dirname(ROOT)
+batch_option = '--batch' if args.batch else None
+
+def _build_bazel_cmd(*args):
+ cmd = ['bazel']
+ if batch_option:
+ cmd.append('--batch')
+ for arg in args:
+ cmd.append(arg)
+ return cmd
+
def retrieve_ext_location():
- return check_output(['bazel', 'info', 'output_base']).strip()
+ return check_output(_build_bazel_cmd('info', 'output_base')).strip()
def _query_classpath():
t = '//tools/eclipse:main_classpath_collect'
try:
- check_call(['bazel', 'build', t])
+ check_call(_build_bazel_cmd('build', t))
except CalledProcessError:
exit(1)
name = 'bazel-bin/tools/eclipse/' + t.split(':')[1] + '.runtime_classpath'