Use log_info, log_error, log_success functions instead of the colors

This commit is contained in:
Andreas Dangel
2018-05-24 19:18:57 +02:00
parent fef93eec64
commit 281f151197
6 changed files with 46 additions and 46 deletions

View File

@@ -5,7 +5,7 @@ source .travis/common-functions.sh
source .travis/colors.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_yellow "[ INFO] Building PMD Sonar ${VERSION} on branch ${TRAVIS_BRANCH}"
log_info "Building PMD Sonar ${VERSION} on branch ${TRAVIS_BRANCH}"
if ! travis_isPush; then
echo "Not updating sonar, since this is not a push!"
@@ -25,9 +25,9 @@ echo "MAVEN_OPTS='-Xms1g -Xmx1g --add-modules java.se.ee'" > ${HOME}/.mavenrc
./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${SONAR_TOKEN} -B -V
if [ $? -ne 0 ]; then
echo_red "[ERROR] Error updating sonar..."
log_error "Error updating sonar..."
else
echo_green "[ INFO] New sonar results: https://sonarcloud.io/dashboard?id=net.sourceforge.pmd%3Apmd"
log_success "New sonar results: https://sonarcloud.io/dashboard?id=net.sourceforge.pmd%3Apmd"
fi
true
)