diff options
author | Kevin Krakauer <krakauer@google.com> | 2020-02-05 14:43:11 -0800 |
---|---|---|
committer | Kevin Krakauer <krakauer@google.com> | 2020-02-05 14:43:11 -0800 |
commit | bf0ea204e9415a181c63ee10078cca753df14f7e (patch) | |
tree | f4d149ac2bf2ea900f8b2a0cdea0a7a2ea7e6d0e /scripts/common_build.sh | |
parent | 29ad5762e4549d961f48c65292cfdeb7256524f6 (diff) | |
parent | f2d3efca1deded31a2929ea77c0eecf476764660 (diff) |
Merge branch 'master' into tcp-matchers-submit
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() { |