Backport all build-related commits from master to stable-0.2 This is a squash of the following commits that are required to make gitiles buildable with the latest bazel: 9374f0a - Remove bazel-genfiles from .gitignore bd0c596 - Use bazelisk as first choice for mvn.sh 9d5cb21 - Replace references to bazel-genfiles with bazel-bin 268d677 - Bazel: Bump bazel version to 1.0.0 03cd750 - Bazel: rules_python must be loaded now 10641da - Upgrade bazlets to latest master revision 06d3ee0 - Bazel: Introduce .bazelversion and update to 0.29.1 3de4f96 - Format all build files with buildifier a267c30 - Bazel: Add fixes for --incompatible_load_java_rules_from_bzl 4d4432d - Upgrade bazlets to latest master revision 422d67a - Align Eclipse settings with Eclipse 2019.06 008bf1b - Update bazlets to latest revision on master Change-Id: I4894d7beee21a0ea4bfd92c6ce3c6bf6477ef639
diff --git a/tools/maven/mvn.sh b/tools/maven/mvn.sh index 93bef01..9b05b6f 100755 --- a/tools/maven/mvn.sh +++ b/tools/maven/mvn.sh
@@ -49,8 +49,14 @@ set -o xtrace fi -bazel build //tools/maven:gen_${command} || \ - { echo "bazel failed to build gen_${command}. Use VERBOSE=1 for more info" ; exit 1 ; } +if [[ `which bazelisk` ]]; then + BAZEL_CMD=bazelisk +else + BAZEL_CMD=bazel +fi + +${BAZEL_CMD} build //tools/maven:gen_${command} || \ + { echo "${BAZEL_CMD} failed to build gen_${command}. Use VERBOSE=1 for more info" ; exit 1 ; } export OUTPUT_BASE=`bazel info output_base` -./bazel-genfiles/tools/maven/${command}.sh +./bazel-bin/tools/maven/${command}.sh