-Build
This commit is contained in:
+5
-3
@@ -22,7 +22,8 @@
|
|||||||
$workingDir = "$baseDir\$workingName"
|
$workingDir = "$baseDir\$workingName"
|
||||||
$workingSourceDir = "$workingDir\Src"
|
$workingSourceDir = "$workingDir\Src"
|
||||||
$builds = @(
|
$builds = @(
|
||||||
@{Name = "Newtonsoft.Json.Dotnet"; TestsName = "Newtonsoft.Json.Tests.Dotnet"; BuildFunction = "NetCliBuild"; TestsFunction = "NetCliTests"; Constants="dotnet"; FinalDir="netstandard1.0"; NuGetDir = "netstandard1.0"; Framework=$null},
|
@{Name = "Newtonsoft.Json.Dotnet"; TestsName = "Newtonsoft.Json.Tests.Dotnet"; BuildFunction = "NetCliBuild"; TestsFunction = "NetCliTests"; Constants="NETSTANDARD1_0"; FinalDir="netstandard1.0"; NuGetDir = "netstandard1.0"; Framework=$null},
|
||||||
|
@{Name = "Newtonsoft.Json.Dotnet"; TestsName = "Newtonsoft.Json.Tests.Dotnet"; BuildFunction = "NetCliBuild"; TestsFunction = "NetCliTests"; Constants="NETSTANDARD1_1"; FinalDir="netstandard1.1"; NuGetDir = "netstandard1.1"; Framework=$null},
|
||||||
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; BuildFunction = "MSBuildBuild"; TestsFunction = "NUnitTests"; Constants=""; FinalDir="Net45"; NuGetDir = "net45"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; BuildFunction = "MSBuildBuild"; TestsFunction = "NUnitTests"; Constants=""; FinalDir="Net45"; NuGetDir = "net45"; Framework="net-4.0"},
|
||||||
@{Name = "Newtonsoft.Json.Portable"; TestsName = "Newtonsoft.Json.Tests.Portable"; BuildFunction = "MSBuildBuild"; TestsFunction = "NUnitTests"; Constants="PORTABLE"; FinalDir="Portable"; NuGetDir = "portable-net45+wp80+win8+wpa81"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json.Portable"; TestsName = "Newtonsoft.Json.Tests.Portable"; BuildFunction = "MSBuildBuild"; TestsFunction = "NUnitTests"; Constants="PORTABLE"; FinalDir="Portable"; NuGetDir = "portable-net45+wp80+win8+wpa81"; Framework="net-4.0"},
|
||||||
@{Name = "Newtonsoft.Json.Portable40"; TestsName = "Newtonsoft.Json.Tests.Portable40"; BuildFunction = "MSBuildBuild"; TestsFunction = "NUnitTests"; Constants="PORTABLE40"; FinalDir="Portable40"; NuGetDir = "portable-net40+sl5+wp80+win8+wpa81"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json.Portable40"; TestsName = "Newtonsoft.Json.Tests.Portable40"; BuildFunction = "MSBuildBuild"; TestsFunction = "NUnitTests"; Constants="PORTABLE40"; FinalDir="Portable40"; NuGetDir = "portable-net40+sl5+wp80+win8+wpa81"; Framework="net-4.0"},
|
||||||
@@ -203,6 +204,7 @@ function MSBuildBuild($build)
|
|||||||
function NetCliBuild($build)
|
function NetCliBuild($build)
|
||||||
{
|
{
|
||||||
$name = $build.Name
|
$name = $build.Name
|
||||||
|
$framework = $build.NuGetDir
|
||||||
$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 }
|
||||||
@@ -212,8 +214,8 @@ function NetCliBuild($build)
|
|||||||
Write-Host
|
Write-Host
|
||||||
exec { dotnet restore $projectPath | Out-Default }
|
exec { dotnet restore $projectPath | Out-Default }
|
||||||
|
|
||||||
Write-Host -ForegroundColor Green "Building $projectPath"
|
Write-Host -ForegroundColor Green "Building $projectPath $framework"
|
||||||
exec { dotnet build $projectPath -f netstandard1.0 -c Release -o bin\Release\netstandard1.0 | Out-Default }
|
exec { dotnet build $projectPath -f $framework -c Release -o bin\Release\$framework | Out-Default }
|
||||||
}
|
}
|
||||||
|
|
||||||
function NetCliTests($build)
|
function NetCliTests($build)
|
||||||
|
|||||||
Reference in New Issue
Block a user