Skip to content

Commit 88651ef

Browse files
committed
Add the -Debug switch to opencover-report.ps1
1 parent 7de1b63 commit 88651ef

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

build/opencover-report.ps1

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
1+
param (
2+
[switch]$Debug
3+
)
4+
15
# Run a build to ensure everything is up-to-date
2-
.\build.ps1 -Debug -Incremental
6+
If ($Debug) {
7+
.\build.ps1 -Debug -Incremental
8+
} Else {
9+
.\build.ps1 -Incremental
10+
}
11+
312
If (-not $?) {
413
$host.UI.WriteErrorLine('Build failed; coverage analysis aborted.')
514
Exit $LASTEXITCODE
615
}
716

17+
If ($Debug) {
18+
$Configuration = 'Debug'
19+
} Else {
20+
$Configuration = 'Release'
21+
}
22+
823
$packages_folder = '..\packages'
924
$opencover_console = "$packages_folder\OpenCover.4.6.247-rc\tools\OpenCover.Console.exe"
1025
$xunit_runner_console = "$packages_folder\xunit.runner.console.2.1.0\tools\xunit.console.x86.exe"
1126
$report_generator = "$packages_folder\ReportGenerator.2.3.5.0\tools\ReportGenerator.exe"
1227
$report_folder = '.\OpenCover.Reports'
13-
$target_dll = '..\StyleCop.Analyzers\StyleCop.Analyzers.Test\bin\Debug\StyleCop.Analyzers.Test.dll'
28+
$target_dll = "..\StyleCop.Analyzers\StyleCop.Analyzers.Test\bin\$Configuration\StyleCop.Analyzers.Test.dll"
1429

1530
If (Test-Path $report_folder) {
1631
Remove-Item -Recurse -Force $report_folder

0 commit comments

Comments
 (0)