diff options
Diffstat (limited to 'scripts/common_build.sh')
-rwxr-xr-x | scripts/common_build.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/common_build.sh b/scripts/common_build.sh index a473a88a4..2c2a826c7 100755 --- a/scripts/common_build.sh +++ b/scripts/common_build.sh @@ -32,21 +32,21 @@ declare -r BAZEL_FLAGS=( "--keep_going" "--verbose_failures=true" ) +BAZEL_RBE_AUTH_FLAGS="" +BAZEL_RBE_FLAGS="" if [[ -v KOKORO_BAZEL_AUTH_CREDENTIAL ]]; then - declare -r BAZEL_RBE_AUTH_FLAGS=( - "--auth_credentials=${KOKORO_BAZEL_AUTH_CREDENTIAL}" - ) - declare -r BAZEL_RBE_FLAGS=("--config=remote") + declare -r BAZEL_RBE_AUTH_FLAGS="--auth_credentials=${KOKORO_BAZEL_AUTH_CREDENTIAL}" + declare -r BAZEL_RBE_FLAGS="--config=remote" fi # Wrap bazel. function build() { - bazel build "${BAZEL_RBE_FLAGS[@]}" "${BAZEL_RBE_AUTH_FLAGS[@]}" "${BAZEL_FLAGS[@]}" "$@" 2>&1 | + bazel build "${BAZEL_RBE_FLAGS}" "${BAZEL_RBE_AUTH_FLAGS}" "${BAZEL_FLAGS[@]}" "$@" 2>&1 | tee /dev/fd/2 | grep -E '^ bazel-bin/' | awk '{ print $1; }' } function test() { - bazel test "${BAZEL_RBE_FLAGS[@]}" "${BAZEL_RBE_AUTH_FLAGS[@]}" "${BAZEL_FLAGS[@]}" "$@" + bazel test "${BAZEL_RBE_FLAGS}" "${BAZEL_RBE_AUTH_FLAGS}" "${BAZEL_FLAGS[@]}" "$@" } function run() { |