mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-23 22:30:26 +02:00
Fill in TRAVIS_COMMIT_RANGE if missing
Workaround for travis-ci/travis-ci#1719
This commit is contained in:
parent
e754d67e14
commit
b14f8c0536
1 changed files with 5 additions and 0 deletions
|
|
@ -6,6 +6,11 @@ set -e
|
|||
STATUS=0
|
||||
bats -t test || STATUS="$?"
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "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" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue