-Updated build to use latest version of NuGet command line package builder
This commit is contained in:
@@ -3,10 +3,9 @@
|
|||||||
<metadata>
|
<metadata>
|
||||||
<id>Newtonsoft.Json</id>
|
<id>Newtonsoft.Json</id>
|
||||||
<version>3.5.8</version>
|
<version>3.5.8</version>
|
||||||
<authors>
|
<authors>James Newton-King</authors>
|
||||||
<author>James Newton-King</author>
|
|
||||||
</authors>
|
|
||||||
<description>Json.NET is a popular high-performance JSON framework for .NET</description>
|
<description>Json.NET is a popular high-performance JSON framework for .NET</description>
|
||||||
<language>en-US</language>
|
<language>en-US</language>
|
||||||
|
<projectUrl>http://james.newtonking.com/projects/json-net.aspx</projectUrl>
|
||||||
</metadata>
|
</metadata>
|
||||||
</package>
|
</package>
|
||||||
+13
-13
@@ -4,7 +4,7 @@
|
|||||||
$signAssemblies = $false
|
$signAssemblies = $false
|
||||||
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
|
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
|
||||||
$buildDocumentation = $false
|
$buildDocumentation = $false
|
||||||
$buildNuPackage = $true
|
$buildNuGet = $true
|
||||||
|
|
||||||
$baseDir = resolve-path ..
|
$baseDir = resolve-path ..
|
||||||
$buildDir = "$baseDir\Build"
|
$buildDir = "$baseDir\Build"
|
||||||
@@ -14,11 +14,11 @@
|
|||||||
$releaseDir = "$baseDir\Release"
|
$releaseDir = "$baseDir\Release"
|
||||||
$workingDir = "$baseDir\Working"
|
$workingDir = "$baseDir\Working"
|
||||||
$builds = @(
|
$builds = @(
|
||||||
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="Net"; NuPackDir = "40"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="Net"; NuGetDir = "40"; Framework="net-4.0"},
|
||||||
@{Name = "Newtonsoft.Json.WindowsPhone"; TestsName = $null; Constants="SILVERLIGHT;WINDOWS_PHONE"; FinalDir="WindowsPhone"; NuPackDir = "WP"; Framework="net-4.0"},
|
@{Name = "Newtonsoft.Json.WindowsPhone"; TestsName = $null; Constants="SILVERLIGHT;WINDOWS_PHONE"; FinalDir="WindowsPhone"; NuGetDir = "WP"; Framework="net-4.0"},
|
||||||
@{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; NuPackDir = "SL"; Framework="net-2.0"},
|
@{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; NuGetDir = "SL"; Framework="net-2.0"},
|
||||||
@{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; Constants="NET35"; FinalDir="Net35"; NuPackDir = "35"; Framework="net-2.0"},
|
@{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; Constants="NET35"; FinalDir="Net35"; NuGetDir = "35"; Framework="net-2.0"},
|
||||||
@{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="Net20"; NuPackDir = "20"; Framework="net-2.0"}
|
@{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="Net20"; NuGetDir = "20"; Framework="net-2.0"}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,22 +83,22 @@ task Package -depends Merge {
|
|||||||
move -Path $workingDir\Documentation\Documentation.chm -Destination $workingDir\Package\Documentation.chm
|
move -Path $workingDir\Documentation\Documentation.chm -Destination $workingDir\Package\Documentation.chm
|
||||||
move -Path $workingDir\Documentation\LastBuild.log -Destination $workingDir\Documentation.log
|
move -Path $workingDir\Documentation\LastBuild.log -Destination $workingDir\Documentation.log
|
||||||
}
|
}
|
||||||
if ($buildNuPackage)
|
if ($buildNuGet)
|
||||||
{
|
{
|
||||||
New-Item -Path $workingDir\NuPack -ItemType Directory
|
New-Item -Path $workingDir\NuGet -ItemType Directory
|
||||||
Copy-Item -Path "$buildDir\Newtonsoft.Json.nuspec" -Destination $workingDir\NuPack\Newtonsoft.Json.nuspec -recurse
|
Copy-Item -Path "$buildDir\Newtonsoft.Json.nuspec" -Destination $workingDir\NuGet\Newtonsoft.Json.nuspec -recurse
|
||||||
|
|
||||||
foreach ($build in $builds)
|
foreach ($build in $builds)
|
||||||
{
|
{
|
||||||
$name = $build.TestsName
|
$name = $build.TestsName
|
||||||
$finalDir = $build.FinalDir
|
$finalDir = $build.FinalDir
|
||||||
$frameworkDir = $build.NuPackDir
|
$frameworkDir = $build.NuGetDir
|
||||||
|
|
||||||
Copy-Item -Path "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" -Destination $workingDir\NuPack\lib\$frameworkDir -recurse
|
Copy-Item -Path "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" -Destination $workingDir\NuGet\lib\$frameworkDir -recurse
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { .\Tools\NuPack\NuPack.exe $workingDir\NuPack\Newtonsoft.Json.nuspec }
|
exec { .\Tools\NuGet\NuGet.exe pack $workingDir\NuGet\Newtonsoft.Json.nuspec }
|
||||||
move -Path .\*.nupkg -Destination $workingDir\NuPack
|
move -Path .\*.nupkg -Destination $workingDir\NuGet
|
||||||
}
|
}
|
||||||
|
|
||||||
Copy-Item -Path $docDir\readme.txt -Destination $workingDir\Package\
|
Copy-Item -Path $docDir\readme.txt -Destination $workingDir\Package\
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user