rbenv-ruby-build/script/test
2015-02-27 02:16:46 +13:00

18 lines
584 B
Bash
Executable file

#!/usr/bin/env bash
set -e
STATUS=0
bats ${CI:+--tap} test || STATUS="$?"
if [ "${TRAVIS_PULL_REQUEST:-false}" != "false" ] && [ -z "$TRAVIS_COMMIT_RANGE" ]; then
first_sha="$(curl -fsSL https://github.com/${TRAVIS_REPO_SLUG}/pull/${TRAVIS_PULL_REQUEST}.patch | head -1 | awk '{print $2}')"
export TRAVIS_COMMIT_RANGE="${first_sha}^..${TRAVIS_COMMIT}"
fi
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
./script/mirror update "$TRAVIS_COMMIT_RANGE"
elif [ "${TRAVIS_PULL_REQUEST:-false}" != "false" ]; then
./script/mirror verify "$TRAVIS_COMMIT_RANGE"
fi
exit "$STATUS"