File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 1
1
# /bin/bash -e
2
2
3
- if [ " $TRAVIS_BRANCH " == ' develop' ]; then
4
- TARGET_BRANCH=' master'
5
- else
6
- TARGET_BRANCH=' develop'
7
- fi
8
-
9
3
sonar_scanner () {
10
4
local params=" $@ "
11
5
@@ -18,15 +12,25 @@ sonar_scanner() {
18
12
-Dsonar.exclusions=' **/tests/**/*.*' \
19
13
-Dsonar.links.ci=' https://travis-ci.com/splitio/php-client' \
20
14
-Dsonar.links.scm=' https://github.com/splitio/php-client' \
21
- -Dsonar.pullrequest.provider=' GitHub' \
22
- -Dsonar.pullrequest.github.repository=' splitio/php-client' \
23
15
" ${params} "
24
16
25
17
return $?
26
18
}
27
19
28
20
if [ " $TRAVIS_PULL_REQUEST " != " false" ]; then
29
- sonar_scanner -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH -Dsonar.pullrequest.base=$TRAVIS_BRANCH
21
+ sonar_scanner \
22
+ -Dsonar.pullrequest.provider=' GitHub' \
23
+ -Dsonar.pullrequest.github.repository=' splitio/php-client' \
24
+ -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST \
25
+ -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH \
26
+ -Dsonar.pullrequest.base=$TRAVIS_BRANCH
30
27
else
31
- sonar_scanner -Dsonar.branch.name=$TRAVIS_BRANCH -Dsonar.branch.target=$TARGET_BRANCH
28
+ if [ " $TRAVIS_BRANCH " == ' develop' ]; then
29
+ TARGET_BRANCH=' master'
30
+ else
31
+ TARGET_BRANCH=' develop'
32
+ fi
33
+ sonar_scanner \
34
+ -Dsonar.branch.name=$TRAVIS_BRANCH \
35
+ -Dsonar.branch.target=$TARGET_BRANCH
32
36
fi
You can’t perform that action at this time.
0 commit comments