2017-07-08 12:25:54 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2018-05-24 19:20:12 +02:00
|
|
|
source .travis/logger.sh
|
2018-06-20 20:57:27 +02:00
|
|
|
source .travis/common-functions.sh
|
2017-07-08 12:25:54 +02:00
|
|
|
|
2018-09-02 14:51:23 +02:00
|
|
|
VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
|
2018-05-24 19:18:57 +02:00
|
|
|
log_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
|
|
|
|
|
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
|
2018-09-01 23:15:29 +02:00
|
|
|
./mvnw package jacoco:report coveralls:report -Pcoveralls -B -V
|
2018-05-22 20:29:13 +02:00
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then
|
2018-05-24 19:18:57 +02:00
|
|
|
log_error "Error creating coveralls report"
|
2018-05-22 20:29:13 +02:00
|
|
|
else
|
2018-05-24 19:18:57 +02:00
|
|
|
log_success "New coveralls result: https://coveralls.io/github/pmd/pmd"
|
2018-05-22 20:29:13 +02:00
|
|
|
fi
|
|
|
|
true
|
|
|
|
)
|