|
3 | 3 | param (
|
4 | 4 | [switch]$Debug,
|
5 | 5 | [switch]$Load,
|
6 |
| - [switch]$Clean) |
| 6 | + [switch]$Clean |
| 7 | +) |
7 | 8 |
|
8 | 9 | $ErrorActionPreference = 'Stop'
|
9 | 10 | Get-Module Pester | Remove-Module
|
@@ -74,22 +75,30 @@ foreach ($s in $script) {
|
74 | 75 |
|
75 | 76 | $sb.ToString() | Set-Content $PSScriptRoot/bin/Pester.psm1 -Encoding UTF8
|
76 | 77 |
|
77 |
| -dotnet build "$PSScriptRoot/src/csharp/Pester.sln" --configuration Release |
78 |
| -if (0 -ne $LASTEXITCODE) { |
79 |
| - throw "build failed!" |
| 78 | +if ($Clean) { |
| 79 | + dotnet build "$PSScriptRoot/src/csharp/Pester.sln" --configuration Release |
| 80 | + if (0 -ne $LASTEXITCODE) { |
| 81 | + throw "build failed!" |
| 82 | + } |
80 | 83 | }
|
81 | 84 |
|
82 | 85 | $content = @(
|
83 | 86 | ,("$PSScriptRoot/src/en-US/*.txt","$PSScriptRoot/bin/en-US/")
|
84 | 87 | ,("$PSScriptRoot/src/nunit_schema_2.5.xsd", "$PSScriptRoot/bin/")
|
| 88 | + ,("$PSScriptRoot/src/junit_schema_4.xsd", "$PSScriptRoot/bin/") |
85 | 89 | ,("$PSScriptRoot/src/report.dtd", "$PSScriptRoot/bin/")
|
86 | 90 | ,("$PSScriptRoot/src/Pester.psd1", "$PSScriptRoot/bin/")
|
87 |
| - ,("$PSScriptRoot/src/csharp/bin/Release/net452/Pester.dll","$PSScriptRoot/bin/bin/net452/") |
88 |
| - ,("$PSScriptRoot/src/csharp/bin/Release/net452/Pester.pdb","$PSScriptRoot/bin/bin/net452/") |
89 |
| - ,("$PSScriptRoot/src/csharp/bin/Release/netstandard2.0/Pester.dll","$PSScriptRoot/bin/bin/netstandard2.0/") |
90 |
| - ,("$PSScriptRoot/src/csharp/bin/Release/netstandard2.0/Pester.pdb","$PSScriptRoot/bin/bin/netstandard2.0/") |
91 | 91 | )
|
92 | 92 |
|
| 93 | +if ($Clean) { |
| 94 | + $content += @( |
| 95 | + ,("$PSScriptRoot/src/csharp/bin/Release/net452/Pester.dll","$PSScriptRoot/bin/bin/net452/") |
| 96 | + ,("$PSScriptRoot/src/csharp/bin/Release/net452/Pester.pdb","$PSScriptRoot/bin/bin/net452/") |
| 97 | + ,("$PSScriptRoot/src/csharp/bin/Release/netstandard2.0/Pester.dll","$PSScriptRoot/bin/bin/netstandard2.0/") |
| 98 | + ,("$PSScriptRoot/src/csharp/bin/Release/netstandard2.0/Pester.pdb","$PSScriptRoot/bin/bin/netstandard2.0/") |
| 99 | + ) |
| 100 | +} |
| 101 | + |
93 | 102 | foreach ($c in $content) {
|
94 | 103 | $source, $destination = $c
|
95 | 104 |
|
|
0 commit comments