From 253526ee97eaef43450e5599b765e7a5cab8fdfe Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 30 May 2017 22:39:35 +0100 Subject: [PATCH] travis-ci: deploy master only after PR is merged Without this, Travis CI will create two deploys, one for the PR and one after the PR is merged. We only want the merged version to be deployed. Deploy parent pom. --- travis-ci/travis-deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis-ci/travis-deploy.sh b/travis-ci/travis-deploy.sh index 5e59a85..d5f7775 100755 --- a/travis-ci/travis-deploy.sh +++ b/travis-ci/travis-deploy.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash -if [ "$TRAVIS_BRANCH" = 'master' ]; then +if [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then echo "Preparing to deploy to nexus..." openssl aes-256-cbc -K $encrypted_efec3258f55d_key -iv $encrypted_efec3258f55d_iv \ -in travis-ci/codesigning.asc.enc -out travis-ci/codesigning.asc -d echo "Signing key decrypted" gpg --batch --fast-import travis-ci/codesigning.asc echo "Signing key imported" - ./mvnw --projects plugin,ruleset --settings travis-ci/travis-settings.xml \ + ./mvnw --projects .,plugin,ruleset --settings travis-ci/travis-settings.xml \ -Dskip-Tests=true -P release -B deploy echo "Deploy complete" else