forked from nixel2007/gitrunner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis.sh
More file actions
executable file
·27 lines (23 loc) · 927 Bytes
/
travis.sh
File metadata and controls
executable file
·27 lines (23 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
oscript /usr/share/oscript/lib/opm/src/opm.os run coverage
temp=`cat packagedef | grep ".Версия(" | sed 's|[^"]*"||' | sed -r 's/".+//'`
version=${temp##*|}
if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
sonar-scanner \
-Dsonar.host.url=http://sonar.silverbulleters.org \
-Dsonar.analysis.mode=issues \
-Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
-Dsonar.github.repository=$TRAVIS_REPO_SLUG \
-Dsonar.github.oauth=$SONAR_GITHUB_TOKEN \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.scanner.skip=false
elif [ "$TRAVIS_BRANCH" == "develop" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
sonar-scanner \
-Dsonar.host.url=http://sonar.silverbulleters.org \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.projectVersion=$version\
-Dsonar.scanner.skip=false
fi
fi