|
| 1 | +# Requires -Version 7 |
| 2 | + |
| 3 | +param( |
| 4 | + [Parameter(Mandatory = $true)] |
| 5 | + [string] |
| 6 | + $Version |
| 7 | +) |
| 8 | + |
| 9 | +function BuildAll { |
| 10 | + param( |
| 11 | + [Parameter(Mandatory = $true)] |
| 12 | + [string] |
| 13 | + $Version, |
| 14 | + |
| 15 | + [Parameter(Mandatory = $true)] |
| 16 | + [string] |
| 17 | + $Configuration |
| 18 | + ) |
| 19 | + |
| 20 | + msbuild /p:Configuration=$Configuration XMLUnit.NET.NetFramework.sln |
| 21 | + msbuild /p:Configuration=$Configuration src/main/net-constraints-nunit4/NetFramework/XMLUnit.NUnit4.Constraints.NetFramework.csproj |
| 22 | + |
| 23 | + dotnet build XMLUnit.NET.sln -c $Configuration |
| 24 | + dotnet build src/main/net-constraints-nunit4/XMLUnit.NUnit4.Constraints.csproj -c $Configuration |
| 25 | +} |
| 26 | + |
| 27 | +function BuildNugetPackage { |
| 28 | + param( |
| 29 | + [Parameter(Mandatory = $true)] |
| 30 | + [string] |
| 31 | + $Version, |
| 32 | + |
| 33 | + [Parameter(Mandatory = $true)] |
| 34 | + [string] |
| 35 | + $Spec |
| 36 | + ) |
| 37 | + |
| 38 | + nuget pack $Spec -Symbols -OutputDirectory build\ -Properties "version=$Version" |
| 39 | +} |
| 40 | + |
| 41 | +$env:DOTNET_ROLL_FORWARD = "Major" |
| 42 | + |
| 43 | +dotnet restore XMLUnit.NET.sln |
| 44 | + |
| 45 | +BuildAll -Version $Version -Configuration Debug |
| 46 | + |
| 47 | +dotnet test src/tests/net-core/XMLUnit.Core.Tests.csproj |
| 48 | +dotnet test src/tests/net-constraints-nunit3/XMLUnit.NUnit3.Constraints.Test.csproj |
| 49 | +dotnet test src/tests/net-placeholders/XMLUnit.Placeholders.Tests.csproj |
| 50 | +dotnet test src/tests/net-constraints-nunit4/XMLUnit.NUnit4.Constraints.Test.csproj |
| 51 | + |
| 52 | +BuildAll -Version $Version -Configuration Release |
| 53 | + |
| 54 | +BuildNugetPackage -Version $Version -Spec src\main\net-core\XMLUnit.Core.nuspec |
| 55 | +BuildNugetPackage -Version $Version -Spec src\main\net-constraints-nunit2\XMLUnit.NUnit2.Constraints.nuspec |
| 56 | +BuildNugetPackage -Version $Version -Spec src\main\net-constraints-nunit3\XMLUnit.NUnit3.Constraints.nuspec |
| 57 | +BuildNugetPackage -Version $Version -Spec src\main\net-constraints-nunit4\XMLUnit.NUnit4.Constraints.nuspec |
| 58 | +BuildNugetPackage -Version $Version -Spec src\main\net-placeholders\XMLUnit.Placeholders.nuspec |
0 commit comments