From 267ade0046fb87f683de297cafbace0321db3460 Mon Sep 17 00:00:00 2001 From: Mira Leung Date: Wed, 9 Sep 2020 14:10:12 -0700 Subject: [PATCH] fix: speed up precommit builds --- .githooks/pre-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index d8091b4316..a0ef4987d4 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -87,7 +87,7 @@ fi if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] then echo_status "Running Java linter..." - bazel build --disk_cache="$BAZEL_CACHE_DIR" //:google_java_format_verification + bazel --batch build --disk_cache="$BAZEL_CACHE_DIR" //:google_java_format_verification FORMAT_STATUS=$? if [ $FORMAT_STATUS != 0 ] then @@ -100,7 +100,7 @@ fi if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] || [ $NUM_BAZEL_FILES_CHANGED -gt 0 ] then echo_status "Checking the build..." - bazel build --disk_cache="$BAZEL_CACHE_DIR" //... + bazel --batch build --disk_cache="$BAZEL_CACHE_DIR" //... BUILD_STATUS=$? if [ $BUILD_STATUS != 0 ] then @@ -112,7 +112,7 @@ fi if [ $NUM_JAVA_FILES_CHANGED -gt 0 ] then echo_status "Checking tests..." - bazel test --disk_cache="$BAZEL_CACHE_DIR" //... + bazel --batch test --disk_cache="$BAZEL_CACHE_DIR" //... TEST_STATUS=$? if [ $TEST_STATUS != 0 ] then