[ci] consider forked builds as pull requests
forked builds are travis builds on forked repos
This commit is contained in:
@ -11,9 +11,8 @@ echo "TRAVIS_BRANCH: $TRAVIS_BRANCH"
|
||||
echo "TRAVIS_TAG: $TRAVIS_TAG"
|
||||
echo "TRAVIS_ALLOW_FAILURE: $TRAVIS_ALLOW_FAILURE"
|
||||
|
||||
|
||||
function travis_isPullRequest() {
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
if [ "${TRAVIS_REPO_SLUG}" != "pmd/pmd" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@ -21,7 +20,7 @@ function travis_isPullRequest() {
|
||||
}
|
||||
|
||||
function travis_isPush() {
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
|
||||
if [ "${TRAVIS_REPO_SLUG}" = "pmd/pmd" && "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
@ -1,12 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "${TRAVIS_SECURE_ENV_VARS}" != "true" ]; then
|
||||
echo "Not setting up secrets (TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS})."
|
||||
if [ "$TRAVIS_REPO_SLUG" != "pmd/pmd" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "${TRAVIS_SECURE_ENV_VARS}" != "true" ]; then
|
||||
echo "Not setting up secrets (TRAVIS_REPO_SLUG=${TRAVIS_REPO_SLUG} TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_SECURE_ENV_VARS=${TRAVIS_SECURE_ENV_VARS})."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
openssl aes-256-cbc -K $encrypted_5630fbebf057_key -iv $encrypted_5630fbebf057_iv -in .travis/secrets.tar.enc -out .travis/secrets.tar -d
|
||||
pushd .travis && tar xfv secrets.tar && popd
|
||||
mkdir -p "$HOME/.ssh"
|
||||
|
Reference in New Issue
Block a user