Skip to content

Commit 3e148c3

Browse files
committed
Fix travis
1 parent 06e5083 commit 3e148c3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
dist: trusty
2+
sudo: required
3+
14
language: java
25

36
jdk:

travis.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ mvn -B clean install -Pits -Dsonar.runtimeVersion=$SQ_VERSION
66

77
if [ "$SQ_VERSION" == "LTS" ]; then
88

9-
mvnCommand = "mvn -B sonar:sonar"
10-
commonArgs = "-Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dsonar.organization=racodond-github"
11-
githubAgs = "-Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST -Dsonar.github.repository=$TRAVIS_REPO_SLUG -Dsonar.github.oauth=$GITHUB_TOKEN"
12-
branchArgs = ''
9+
mvnCommand='mvn -B sonar:sonar'
10+
commonArgs="-Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dsonar.organization=racodond-github"
11+
githubArgs="-Dsonar.analysis.mode=preview -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST -Dsonar.github.repository=$TRAVIS_REPO_SLUG -Dsonar.github.oauth=$GITHUB_TOKEN"
12+
branchArgs=''
1313

1414
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
1515
if [ "$TRAVIS_BRANCH" != "master" ]; then
16-
branchArgs = "-Dsonar.branch.name=$TRAVIS_BRANCH -Dsonar.branch.target=master"
16+
branchArgs="-Dsonar.branch.name=$TRAVIS_BRANCH -Dsonar.branch.target=master"
1717
fi
18-
$mvnCommand $commonArgs $branchArgs
18+
eval $mvnCommand $commonArgs $branchArgs
1919
else
20-
$mvnCommand $commonArgs $githubArgs
21-
20+
eval $mvnCommand $commonArgs $githubArgs
2221
fi
2322

2423
fi

0 commit comments

Comments
 (0)