From 67d903ed71fbc909ea06bb8097313a4218c8f566 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Wed, 6 Dec 2017 10:32:48 -0500 Subject: [PATCH] Update kokoro bazel runner for v4. --- .kokoro | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.kokoro b/.kokoro index 89ec030..cda1d70 100755 --- a/.kokoro +++ b/.kokoro @@ -20,7 +20,35 @@ set -e # Display commands to stderr. set -x -KOKORO_RUNNER_VERSION="v3.*" +KOKORO_RUNNER_VERSION="v4.*" + +POSITIONAL=() +while [[ $# -gt 0 ]]; do + key="$1" + + case $key in + -v|--verbose) + VERBOSE_OUTPUT="1" + shift + ;; + *) + POSITIONAL+=("$1") + shift + ;; + esac +done +set -- "${POSITIONAL[@]}" # restore positional parameters + +if [ -n "$KOKORO_BUILD_NUMBER" ]; then + # Always enable verbose output on kokoro runs. + VERBOSE_OUTPUT=1 +fi + +if [ -n "$VERBOSE_OUTPUT" ]; then + # Display commands to stderr. + set -x + verbosity_args="-v" +fi if [ ! -d .kokoro-ios-runner ]; then git clone https://github.com/material-foundation/kokoro-ios-runner.git .kokoro-ios-runner @@ -33,6 +61,6 @@ TAG=$(git tag --sort=v:refname -l "$KOKORO_RUNNER_VERSION" | tail -n1) git checkout "$TAG" > /dev/null popd -./.kokoro-ios-runner/bazel.sh test //:UnitTests 8.1.0 +./.kokoro-ios-runner/bazel.sh test //:UnitTests --min-xcode-version 8.1.0 $verbosity_args echo "Success!"