aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Ivanov <ivanov-jr@mail.ru>2017-12-15 11:56:24 -0800
committerRoman Ivanov <ivanov-jr@mail.ru>2017-12-15 11:56:24 -0800
commitff742454d77d81ed67212e794b0bd89ce9c8ed82 (patch)
treed7b5341a2e1a183086a5eeaf27dbef33f6e5b874
parente702daf7bff9409a96a9df6bd7eb9405feb62549 (diff)
downloadcheckstyle-ff742454d77d81ed67212e794b0bd89ce9c8ed82.tar.gz
minor: allow to run travis commands without travis variables
-rwxr-xr-x.ci/travis/travis.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/.ci/travis/travis.sh b/.ci/travis/travis.sh
index e5d20a8a7..cf107e0f6 100755
--- a/.ci/travis/travis.sh
+++ b/.ci/travis/travis.sh
@@ -14,7 +14,7 @@ nondex)
;;
versions)
- if [[ $TRAVIS_EVENT_TYPE != "cron" ]]; then exit 0; fi
+ if [[ -v TRAVIS_EVENT_TYPE && $TRAVIS_EVENT_TYPE != "cron" ]]; then exit 0; fi
mvn clean versions:dependency-updates-report versions:plugin-updates-report
if [ $(grep "<nextVersion>" target/*-updates-report.xml | cat | wc -l) -gt 0 ]; then
echo "Version reports (dependency-updates-report.xml):"
@@ -46,7 +46,8 @@ assembly-run-all-jar)
sonarqube)
# token could be generated at https://sonarcloud.io/account/security/
# executon on local: SONAR_TOKEN=xxxxxxxxxx ./.ci/travis/travis.sh sonarqube
- if [[ $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi
+ if [[ -v TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST && $TRAVIS_PULL_REQUEST =~ ^([0-9]*)$ ]]; then exit 0; fi
+ if [[ -z $SONAR_TOKEN ]]; then echo "SONAR_TOKEN is not set"; sleep 5s; exit 1; fi
export MAVEN_OPTS='-Xmx2000m'
mvn clean package cobertura:cobertura sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \