-Build
This commit is contained in:
+4
-14
@@ -8,7 +8,7 @@
|
|||||||
$signAssemblies = $false
|
$signAssemblies = $false
|
||||||
$signKeyPath = "C:\Development\Releases\newtonsoft.snk"
|
$signKeyPath = "C:\Development\Releases\newtonsoft.snk"
|
||||||
$buildDocumentation = $false
|
$buildDocumentation = $false
|
||||||
$buildNuGet = $false
|
$buildNuGet = $true
|
||||||
$treatWarningsAsErrors = $false
|
$treatWarningsAsErrors = $false
|
||||||
$workingName = if ($workingName) {$workingName} else {"Working"}
|
$workingName = if ($workingName) {$workingName} else {"Working"}
|
||||||
$netCliChannel = "2.0"
|
$netCliChannel = "2.0"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
framework '4.6x86'
|
framework '4.6x86'
|
||||||
|
|
||||||
task default -depends Test
|
task default -depends Test,Package
|
||||||
|
|
||||||
# Ensure a clean working directory
|
# Ensure a clean working directory
|
||||||
task Clean {
|
task Clean {
|
||||||
@@ -151,13 +151,7 @@ task Package -depends Build {
|
|||||||
Compress-Archive -Path $workingDir\Package\* -DestinationPath $workingDir\$zipFileName
|
Compress-Archive -Path $workingDir\Package\* -DestinationPath $workingDir\$zipFileName
|
||||||
}
|
}
|
||||||
|
|
||||||
# Unzip package to a location
|
task Test -depends Build {
|
||||||
task Deploy -depends Package {
|
|
||||||
Expand-Archive -Path $workingDir\$zipFileName -DestinationPath "$workingDir\Deployed"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run tests on deployed files
|
|
||||||
task Test -depends Deploy {
|
|
||||||
foreach ($build in $script:enabledBuilds)
|
foreach ($build in $script:enabledBuilds)
|
||||||
{
|
{
|
||||||
Write-Host "Calling $($build.TestsFunction)"
|
Write-Host "Calling $($build.TestsFunction)"
|
||||||
@@ -243,11 +237,7 @@ function NUnitTests($build)
|
|||||||
{
|
{
|
||||||
$testDir = if ($build.TestFramework -ne $null) { $build.TestFramework } else { $build.Framework }
|
$testDir = if ($build.TestFramework -ne $null) { $build.TestFramework } else { $build.Framework }
|
||||||
$framework = $build.NUnitFramework
|
$framework = $build.NUnitFramework
|
||||||
$testRunDir = "$workingDir\Deployed\Bin\$($build.Framework)"
|
$testRunDir = "$workingSourceDir\Newtonsoft.Json.Tests\bin\Release\$testDir"
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor Green "Running NUnit tests $testDir"
|
Write-Host -ForegroundColor Green "Running NUnit tests $testDir"
|
||||||
Write-Host
|
Write-Host
|
||||||
|
|||||||
Reference in New Issue
Block a user