-Build
This commit is contained in:
+39
-15
@@ -136,7 +136,19 @@ task Package -depends Build {
|
|||||||
Write-Host
|
Write-Host
|
||||||
|
|
||||||
exec { & $nugetPath pack $nuspecPath -Symbols }
|
exec { & $nugetPath pack $nuspecPath -Symbols }
|
||||||
exec { dotnet pack $workingSourceDir\Newtonsoft.Json\project.json -c Release }
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Set-Location "$workingSourceDir\Newtonsoft.Json"
|
||||||
|
|
||||||
|
exec { dotnet --version | Out-Default }
|
||||||
|
exec { dotnet pack $workingSourceDir\Newtonsoft.Json\project.json -c Release | Out-Default }
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Set-Location $baseDir
|
||||||
|
}
|
||||||
|
|
||||||
move -Path .\*.nupkg -Destination $workingDir\NuGet
|
move -Path .\*.nupkg -Destination $workingDir\NuGet
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,14 +232,24 @@ function NetCliBuild($build)
|
|||||||
$projectPath = "$workingSourceDir\Newtonsoft.Json\project.json"
|
$projectPath = "$workingSourceDir\Newtonsoft.Json\project.json"
|
||||||
|
|
||||||
exec { .\Tools\Dotnet\dotnet-install.ps1 -Version $netCliVersion | Out-Default }
|
exec { .\Tools\Dotnet\dotnet-install.ps1 -Version $netCliVersion | Out-Default }
|
||||||
exec { dotnet --version | Out-Default }
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor Green "Restoring packages for $name"
|
try
|
||||||
Write-Host
|
{
|
||||||
exec { dotnet restore $projectPath | Out-Default }
|
Set-Location "$workingSourceDir\Newtonsoft.Json"
|
||||||
|
|
||||||
Write-Host -ForegroundColor Green "Building $projectPath $framework"
|
exec { dotnet --version | Out-Default }
|
||||||
exec { dotnet build $projectPath -f $framework -c Release -o bin\Release\$framework | Out-Default }
|
|
||||||
|
Write-Host -ForegroundColor Green "Restoring packages for $name"
|
||||||
|
Write-Host
|
||||||
|
exec { dotnet restore $projectPath | Out-Default }
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Green "Building $projectPath $framework"
|
||||||
|
exec { dotnet build $projectPath -f $framework -c Release -o bin\Release\$framework | Out-Default }
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Set-Location $baseDir
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function NetCliTests($build)
|
function NetCliTests($build)
|
||||||
@@ -235,18 +257,20 @@ function NetCliTests($build)
|
|||||||
$name = $build.TestsName
|
$name = $build.TestsName
|
||||||
|
|
||||||
exec { .\Tools\Dotnet\dotnet-install.ps1 -Version $netCliVersion | Out-Default }
|
exec { .\Tools\Dotnet\dotnet-install.ps1 -Version $netCliVersion | Out-Default }
|
||||||
exec { dotnet --version | Out-Default }
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor Green "Restoring packages for $name"
|
|
||||||
Write-Host
|
|
||||||
exec { dotnet restore "$workingSourceDir\Newtonsoft.Json.Tests\project.json" | Out-Default }
|
|
||||||
|
|
||||||
Write-Host -ForegroundColor Green "Ensuring test project builds for $name"
|
|
||||||
Write-Host
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Set-Location "$workingSourceDir\Newtonsoft.Json.Tests"
|
Set-Location "$workingSourceDir\Newtonsoft.Json.Tests"
|
||||||
|
|
||||||
|
exec { dotnet --version | Out-Default }
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Green "Restoring packages for $name"
|
||||||
|
Write-Host
|
||||||
|
exec { dotnet restore "$workingSourceDir\Newtonsoft.Json.Tests\project.json" | Out-Default }
|
||||||
|
|
||||||
|
Write-Host -ForegroundColor Green "Ensuring test project builds for $name"
|
||||||
|
Write-Host
|
||||||
|
|
||||||
exec { dotnet test "$workingSourceDir\Newtonsoft.Json.Tests\project.json" -f netcoreapp1.0 -c Release -parallel none | Out-Default }
|
exec { dotnet test "$workingSourceDir\Newtonsoft.Json.Tests\project.json" -f netcoreapp1.0 -c Release -parallel none | Out-Default }
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|||||||
Reference in New Issue
Block a user