From a05864d40d93d24a76cf313f5d0617483130001f Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sat, 9 Sep 2017 22:26:22 +1200 Subject: [PATCH] -Build --- Build/build.ps1 | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Build/build.ps1 b/Build/build.ps1 index a6115d7e..3384da09 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -8,7 +8,7 @@ $signAssemblies = $false $signKeyPath = "C:\Development\Releases\newtonsoft.snk" $buildDocumentation = $false - $buildNuGet = $false + $buildNuGet = $true $treatWarningsAsErrors = $false $workingName = if ($workingName) {$workingName} else {"Working"} $netCliChannel = "2.0" @@ -44,7 +44,7 @@ framework '4.6x86' -task default -depends Test +task default -depends Test,Package # Ensure a clean working directory task Clean { @@ -151,13 +151,7 @@ task Package -depends Build { Compress-Archive -Path $workingDir\Package\* -DestinationPath $workingDir\$zipFileName } -# Unzip package to a location -task Deploy -depends Package { - Expand-Archive -Path $workingDir\$zipFileName -DestinationPath "$workingDir\Deployed" -} - -# Run tests on deployed files -task Test -depends Deploy { +task Test -depends Build { foreach ($build in $script:enabledBuilds) { Write-Host "Calling $($build.TestsFunction)" @@ -243,11 +237,7 @@ function NUnitTests($build) { $testDir = if ($build.TestFramework -ne $null) { $build.TestFramework } else { $build.Framework } $framework = $build.NUnitFramework - $testRunDir = "$workingDir\Deployed\Bin\$($build.Framework)" - - Write-Host -ForegroundColor Green "Copying test assembly $testDir to deployed directory" - Write-Host - robocopy "$workingSourceDir\Newtonsoft.Json.Tests\bin\Release\$testDir" $testRunDir /MIR /NFL /NDL /NJS /NC /NS /NP /XO | Out-Default + $testRunDir = "$workingSourceDir\Newtonsoft.Json.Tests\bin\Release\$testDir" Write-Host -ForegroundColor Green "Running NUnit tests $testDir" Write-Host