2017-07-08 12:25:54 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
source .travis/common-functions.sh
|
2018-05-22 20:29:13 +02:00
|
|
|
source .travis/colors.sh
|
2017-07-08 12:25:54 +02:00
|
|
|
|
|
|
|
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec | tail -1)
|
2018-05-22 20:29:13 +02:00
|
|
|
echo_yellow "[ INFO] Building PMD Coveralls.io report ${VERSION} on branch ${TRAVIS_BRANCH}"
|
2017-07-08 12:25:54 +02:00
|
|
|
|
|
|
|
if ! travis_isPush; then
|
|
|
|
echo "Not proceeding, since this is not a push!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2017-10-01 14:08:07 +02:00
|
|
|
#
|
|
|
|
# for java9: enable all modules.
|
|
|
|
# coveralls plugin seems to need java.xml.bind module
|
2018-02-18 21:47:50 +01:00
|
|
|
echo "MAVEN_OPTS='-Xms1g -Xmx1g --add-modules java.se.ee'" > ${HOME}/.mavenrc
|
2017-07-08 12:25:54 +02:00
|
|
|
|
2018-05-22 20:29:13 +02:00
|
|
|
(
|
|
|
|
# disable fast fail, exit immediately, in this subshell
|
|
|
|
set +e
|
|
|
|
|
|
|
|
./mvnw clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
|
|
|
./mvnw test jacoco:report coveralls:report -Pcoveralls -B -V
|
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo_red "[ERROR] Error creating coveralls report"
|
|
|
|
else
|
|
|
|
echo_green "[ INFO] New coveralls result: https://coveralls.io/github/pmd/pmd"
|
|
|
|
fi
|
|
|
|
true
|
|
|
|
)
|