Fix condition for when to upload the binaries to sourceforge

Travis builds each commit during the release process: this means,
the commit on the branch, which changes the version to a non-
SNAPSHOT version, is also built. And after that, the tag is built.
Therefore, we upload, when we build SNAPSHOTS or when we build from a
tag.
This commit is contained in:
Andreas Dangel
2017-02-25 21:29:45 +01:00
parent 34b210c47e
commit 6e4a5aef0e

View File

@ -20,7 +20,7 @@ bash .travis/build-site.sh
)
# Uploading pmd distribution to sourceforge
if [ "$TRAVIS_TAG" = "" ]; then
if [[ "$TRAVIS_TAG" != "" || "$VERSION" == *-SNAPSHOT ]]; then
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
fi