Only rsync the snapshot site from master branch

This commit is contained in:
Andreas Dangel
2017-02-24 22:01:20 +01:00
parent 57049e0c15
commit 6613a79429

View File

@ -21,13 +21,13 @@ mvn site site:stage -Psite
rsync -avh pmd-dist/target/pmd-*-${VERSION}.zip target/pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
rsync -avh src/site/markdown/overview/changelog.md ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/ReadMe.md
if [[ "$VERSION" == *-SNAPSHOT ]]; then
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
# Uploading snapshot site...
rsync -avh --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/
fi
if [[ "$VERSION" == *-SNAPSHOT ]]; then
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
# only do a clean build for sonar, if we are executing a snapshot build, otherwise we can't reuse the build from above for the release
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} -B -V
fi