Fix undeclared variable error in common_build.sh.
PiperOrigin-RevId: 293413711
This commit is contained in:
parent
eea0eeee93
commit
f2d3efca1d
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue