diff options
author | Brad Burlage <brb@google.com> | 2020-02-05 11:33:48 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-05 11:34:46 -0800 |
commit | f2d3efca1deded31a2929ea77c0eecf476764660 (patch) | |
tree | e4e93d094bd14384a60cc084b72931b24bfdea8c /scripts | |
parent | eea0eeee933ba8406ae688fce4348271f9513514 (diff) |
Fix undeclared variable error in common_build.sh.
PiperOrigin-RevId: 293413711
Diffstat (limited to 'scripts')
-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() { |