File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -134,11 +134,12 @@ Task("RunUnitTests")
134
134
var coverageSummaryFile = GetSubDirectories ( artifactsForUnitTestsDir ) . First ( ) . CombineWithFilePath ( File ( "coverage.opencover.xml" ) ) ;
135
135
Information ( coverageSummaryFile ) ;
136
136
Information ( artifactsForUnitTestsDir ) ;
137
+
137
138
// todo bring back report generator to get a friendly report
138
139
// ReportGenerator(coverageSummaryFile, artifactsForUnitTestsDir);
139
140
// https://github.com/danielpalme/ReportGenerator
140
-
141
- if ( IsRunningOnCircleCI ( ) )
141
+
142
+ if ( IsRunningOnCircleCI ( ) && IsMaster ( ) )
142
143
{
143
144
var repoToken = EnvironmentVariable ( coverallsRepoToken ) ;
144
145
if ( string . IsNullOrEmpty ( repoToken ) )
@@ -497,4 +498,9 @@ private string GetResource(string url)
497
498
private bool IsRunningOnCircleCI ( )
498
499
{
499
500
return ! string . IsNullOrWhiteSpace ( Environment . GetEnvironmentVariable ( "CIRCLECI" ) ) ;
501
+ }
502
+
503
+ private bool IsMaster ( )
504
+ {
505
+ return Environment . GetEnvironmentVariable ( "CIRCLE_BRANCH" ) . ToLower ( ) == "master" ;
500
506
}
You can’t perform that action at this time.
0 commit comments