diff --git a/.travis.yml b/.travis.yml index d3933d1..101c8e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ env: global: secure: "KncKGamS99AWFQNs2L4a3s65BdNvP07yD/fulNZA+tsBNVLgxsieXkRdzrA5Efxbd5PvnBJuLkYgjPFSFh4uPNwijH5PnZMsSYlnSFIbLyGAIkWx2cJeUoDXOOrbHIeRmCDS6gZjs9sUZHrVlhF9B/19txf4XUjpd/6slqdsEng=" # BINTRAY_API_KEY matrix: - - HV_VERSION=4.3.2.Final + - HV_VERSION=4.3.2.Final DEPLOY=yes - HV_VERSION=5.0.3.Final - HV_VERSION=5.1.3.Final - HV_VERSION=5.2.5.Final @@ -26,4 +26,12 @@ script: - mvn verify -Ptest-different-hv-version -Dhv.version.test=${HV_VERSION} --batch-mode after_success: - mvn jacoco:report coveralls:report - - script/travis-deploy + +deploy: + provider: script + script: script/travis-deploy + skip_cleanup: true + on: + branch: master + jdk: oraclejdk8 + condition: "$DEPLOY = yes" diff --git a/script/travis-deploy b/script/travis-deploy index 5cdf016..e0b0873 100755 --- a/script/travis-deploy +++ b/script/travis-deploy @@ -4,21 +4,9 @@ set -e cd "$(dirname "$0")/.." -if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then - echo 'This is a pull request, skipping deploy.'; exit 0 -fi - if [ -z "$BINTRAY_API_KEY" ]; then echo '$BINTRAY_API_KEY is not set, skipping deploy.'; exit 0 fi -if [ "$TRAVIS_BRANCH" != 'master' ]; then - echo 'This is not the master branch, skipping deploy.'; exit 0 -fi - -if [ "${TRAVIS_BUILD_NUMBER}.5" != "$TRAVIS_JOB_NUMBER" ]; then - echo 'This is not the build job we are looking for, skipping deploy.'; exit 0 -fi - echo '==> Deploying artifact to JFrog OSS Maven repository' mvn deploy --settings .maven-bintray.xml -Dgpg.skip=true -DskipTests=true