Fix travis build for releases (refs #376)

This commit is contained in:
Andreas Dangel
2017-05-20 11:17:35 +02:00
parent 050e659c68
commit fb56643590
2 changed files with 8 additions and 1 deletions

View File

@ -47,7 +47,7 @@ deploy:
on:
tags: true
repo: pmd/pmd
condition: "${TRAVIS_SECURE_ENV_VARS} = true"
condition: "${TRAVIS_SECURE_ENV_VARS} = true && ${BUILD} != sonar"
after_deploy: bash .travis/release.sh
notifications:

View File

@ -1,6 +1,13 @@
#!/bin/bash
set -e
echo "BUILD: $BUILD"
if [ "${BUILD}" != "deploy" ]; then
echo "Skipping deployment script, it needs to run only once"
exit 0
fi
RELEASE_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
# Deploy to ossrh has already been done with the usual build. See build-deploy.sh