File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,16 @@ matrix:
99 - dotnet : 2.1 # latest available release
1010 mono : none
1111 env :
12- - WITH_SONAR_ANALYSIS=true
12+ - WITH_SONAR_ANALYSIS=$([ "$TRAVIS_PULL_REQUEST" = "false" ] && echo true || echo false)
1313 - TEST_RESULTS_PATH=./Mastercard.Developer.OAuth1Signer.Tests/bin
1414solution : Mastercard.Developer.OAuth1Signer.sln
1515install :
1616 - dotnet restore
17- - test $WITH_SONAR_ANALYSIS && dotnet tool install --global dotnet-sonarscanner || echo 'Skipping sonarscanner install'
17+ - test " $WITH_SONAR_ANALYSIS" = "true" && dotnet tool install --global dotnet-sonarscanner || echo 'Skipping sonarscanner install'
1818before_script :
1919 - export PATH="$PATH:$HOME/.dotnet/tools"
2020 - |
21- test $WITH_SONAR_ANALYSIS && dotnet sonarscanner begin \
21+ test " $WITH_SONAR_ANALYSIS" = "true" && dotnet sonarscanner begin \
2222 /k:"$SONAR_PROJECT_KEY" \
2323 /n:"$SONAR_PROJECT_NAME" \
2424 /d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
@@ -30,4 +30,4 @@ script:
3030 - dotnet test -c Release -l:"trx;LogFileName=tests.trx" -r:"bin/" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="bin/coverage.xml"
3131 - dotnet publish -c Release
3232after_success :
33- - test $WITH_SONAR_ANALYSIS && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN" || echo 'Skipping sonarscanner end'
33+ - test " $WITH_SONAR_ANALYSIS" = "true" && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN" || echo 'Skipping sonarscanner end'
You can’t perform that action at this time.
0 commit comments