@ -6,12 +6,12 @@ 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)
|
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}"
|
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
|
||||||
|
|
||||||
if [ travis_isPullRequest ]; then
|
if travis_isPullRequest; then
|
||||||
|
|
||||||
echo "This is a pull-request build"
|
echo "This is a pull-request build"
|
||||||
./mvnw verify -B -V
|
./mvnw verify -B -V
|
||||||
|
|
||||||
elif [ travis_isPush ]; then
|
elif travis_isPush; then
|
||||||
|
|
||||||
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
|
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
|
||||||
echo "This is a release build for tag $TRAVIS_TAG"
|
echo "This is a release build for tag $TRAVIS_TAG"
|
||||||
|
@ -6,7 +6,7 @@ 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)
|
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}"
|
echo "Building PMD Site ${VERSION} on branch ${TRAVIS_BRANCH}"
|
||||||
|
|
||||||
if [ ! travis_isPush ]; then
|
if ! travis_isPush; then
|
||||||
echo "Not building site, since this is not a push!"
|
echo "Not building site, since this is not a push!"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -6,7 +6,7 @@ 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)
|
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}"
|
echo "Building PMD Sonar ${VERSION} on branch ${TRAVIS_BRANCH}"
|
||||||
|
|
||||||
if [ ! travis_isPush ]; then
|
if ! travis_isPush; then
|
||||||
echo "Not updating sonar, since this is not a push!"
|
echo "Not updating sonar, since this is not a push!"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -14,16 +14,16 @@ echo "TRAVIS_ALLOW_FAILURE: $TRAVIS_ALLOW_FAILURE"
|
|||||||
|
|
||||||
function travis_isPullRequest() {
|
function travis_isPullRequest() {
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
return true
|
return 0
|
||||||
else
|
else
|
||||||
return false
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function travis_isPush() {
|
function travis_isPush() {
|
||||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ]; then
|
||||||
return true
|
return 0
|
||||||
else
|
else
|
||||||
return false
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user