2017-05-15 21:11:43 +02:00
|
|
|
#!/bin/bash
|
2017-05-20 10:16:29 +02:00
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
|
|
|
|
echo "TRAVIS_PULL_REQUEST_SLUG: $TRAVIS_PULL_REQUEST_SLUG"
|
|
|
|
echo "TRAVIS_PULL_REQUEST_BRANCH: $TRAVIS_PULL_REQUEST_BRANCH"
|
|
|
|
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
|
|
|
|
echo "TRAVIS_SECURE_ENV_VARS: $TRAVIS_SECURE_ENV_VARS"
|
|
|
|
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
|
|
|
|
echo "TRAVIS_TAG: $TRAVIS_TAG"
|
|
|
|
echo "TRAVIS_ALLOW_FAILURE: $TRAVIS_ALLOW_FAILURE"
|
|
|
|
|
2017-05-15 21:11:43 +02:00
|
|
|
function travis_isPullRequest() {
|
2017-10-08 09:43:56 +02:00
|
|
|
if [ "${TRAVIS_REPO_SLUG}" != "pmd/pmd" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
2017-05-20 10:43:14 +02:00
|
|
|
return 0
|
2017-05-15 21:11:43 +02:00
|
|
|
else
|
2017-05-20 10:43:14 +02:00
|
|
|
return 1
|
2017-05-15 21:11:43 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
function travis_isPush() {
|
2017-10-08 09:54:02 +02:00
|
|
|
if [ "${TRAVIS_REPO_SLUG}" = "pmd/pmd" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
|
2017-05-20 10:43:14 +02:00
|
|
|
return 0
|
2017-05-15 21:11:43 +02:00
|
|
|
else
|
2017-05-20 10:43:14 +02:00
|
|
|
return 1
|
2017-05-15 21:11:43 +02:00
|
|
|
fi
|
|
|
|
}
|