Travis - only run "mvn deploy", when it should be run

This commit is contained in:
Andreas Dangel
2017-02-27 20:26:02 +01:00
parent a39561df5f
commit d8a367187c

View File

@ -5,11 +5,19 @@ VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
# release build
mvn deploy -Possrh,pmd-release -B -V
else
elif [[ "$VERSION" == *-SNAPSHOT ]]; then
# snapshot build
mvn deploy -Possrh -B -V
else
# other build. Can happen during release: the commit with a non snapshot version is built, but not from the tag.
mvn verify -Possrh -B -V
# we stop here - no need to execute further steps
exit 0
fi
bash .travis/build-site.sh
# create pmd-doc archive