Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Commit b8690ee

Browse files
author
ingvord
committed
integrate sonar [0,5h]
1 parent fea1a00 commit b8690ee

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ script:
5050
- .travis/test.sh COVERALLS=OFF
5151

5252
after_success:
53-
- test ${SONAR_SCANNER} = "ON" && git fetch --unshallow --quiet && cd /home/tango/src && sonar-scanner
53+
- test ${SONAR_SCANNER} = "ON" && .travis/sonar.sh
5454

5555
deploy:
5656
- provider: script

.travis/sonar.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
4+
SONAR_PROPERTIES=""
5+
else
6+
SONAR_PROPERTIES="-Dsonar.pullrequest.base=$TRAVIS_BRANCH -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST"
7+
fi
8+
echo "Using SONAR_PROPERTIES=$SONAR_PROPERTIES"
9+
git fetch --unshallow --quiet
10+
cd /home/tango/src
11+
sonar-scanner $SONAR_PROPERTIES

0 commit comments

Comments
 (0)