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!"