From 8ef25e839cfc39f768e4f809f94a36b7f31f2e87 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 20 May 2017 09:55:09 +0200 Subject: [PATCH] Fix travis build, part 2 (refs #376) --- .travis/build-deploy.sh | 2 +- .travis/build-push.sh | 46 ----------------------------------------- .travis/build-site.sh | 2 +- .travis/build-sonar.sh | 2 +- 4 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 .travis/build-push.sh diff --git a/.travis/build-deploy.sh b/.travis/build-deploy.sh index 066984010f..9b61923a40 100644 --- a/.travis/build-deploy.sh +++ b/.travis/build-deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ev -source .travis/common-functions.h +source .travis/common-functions.sh VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}" diff --git a/.travis/build-push.sh b/.travis/build-push.sh deleted file mode 100644 index 95b5aa50ee..0000000000 --- a/.travis/build-push.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -ev - -VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) -echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}" - -if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then - # release build - ./mvnw deploy -Possrh,pmd-release -B -V -elif [[ "$VERSION" == *-SNAPSHOT ]]; then - # snapshot build - ./mvnw 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. - ./mvnw 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 -( - cd target - mv staging pmd-doc-${VERSION} - zip -qr pmd-doc-${VERSION}.zip pmd-doc-${VERSION}/ -) - -# Uploading pmd distribution to sourceforge -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 - -if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then - # Uploading snapshot site... - rsync -ah --stats --delete target/pmd-doc-${VERSION}/ ${PMD_SF_USER}@web.sourceforge.net:/home/project-web/pmd/htdocs/snapshot/ -fi - - -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 - bash .travis/build-sonar.sh -fi - diff --git a/.travis/build-site.sh b/.travis/build-site.sh index ff07d255cf..f9377ddbea 100644 --- a/.travis/build-site.sh +++ b/.travis/build-site.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ev -source .travis/common-functions.h +source .travis/common-functions.sh VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) echo "Building PMD Site ${VERSION} on branch ${TRAVIS_BRANCH}" diff --git a/.travis/build-sonar.sh b/.travis/build-sonar.sh index 42f8fbd41d..20010fd901 100644 --- a/.travis/build-sonar.sh +++ b/.travis/build-sonar.sh @@ -1,7 +1,7 @@ #!/bin/bash set -ev -source .travis/common-functions.h +source .travis/common-functions.sh VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1) echo "Building PMD Sonar ${VERSION} on branch ${TRAVIS_BRANCH}"