kemitix-checkstyle-ruleset/travis-ci/travis-deploy.sh
Paul Campbell 253526ee97 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.
2017-05-30 22:39:35 +01:00

18 lines
677 B
Bash
Executable file

#!/usr/bin/env bash
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 \
-Dskip-Tests=true -P release -B deploy
echo "Deploy complete"
else
echo "Not deploying"
echo " TRAVIS_BRANCH: $TRAVIS_BRANCH"
echo " TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
fi