diff --git a/.travis.yml b/.travis.yml index 1c04c2279d..d209532638 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,14 @@ language: java +before_script: + - SHOULD_DEPLOY=no + - '[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && SHOULD_DEPLOY=yes' + - export SHOULD_DEPLOY matrix: include: - jdk: oraclejdk7 script: - - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn test deploy --settings .travis-settings.xml || ( [ "${TRAVIS_PULL_REQUEST}" != "false" ] && echo "Skipping Deploy - it is a pull request" )' - - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] || mvn test' + - '[ "${SHOULD_DEPLOY}" = "yes" ] && mvn test deploy --settings .travis-settings.xml || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Deploy" )' + - '[ "${SHOULD_DEPLOY}" = "yes" ] || mvn test' - jdk: oraclejdk8 script: mvn test branches: