1 # See https://github.com/drush-ops/drush/pull/1426 for background information.
3 # $AUTH_TOKEN is provided via a secure Travis environment variable.
4 # Secure environment variables are not set for pull requests that
5 # originated from another repository, so skip child tests if $AUTH_TOKEN
7 if [ -n "$AUTH_TOKEN" ]
9 # After a travis build succeeds, run tests from any child repository defined in $TEST_CHILDREN
10 for CHILD in $TEST_CHILDREN
12 BUILD_NUM=$(curl -s "https://api.travis-ci.org/repos/$CHILD/builds" | grep -o '^\[{"id":[0-9]*,' | grep -o '[0-9]' | tr -d '\n')
13 echo "Restarting build $BUILD_NUM for $CHILD"
14 curl -X POST https://api.travis-ci.org/builds/$BUILD_NUM/restart --header "Authorization: token "$AUTH_TOKEN