Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/Newtonsoft.Json.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJamesNK <james@newtonking.com>2010-10-12 11:15:13 +0400
committerJamesNK <james@newtonking.com>2010-10-12 11:15:13 +0400
commit336f14b3d2cd59a854a3b8565d99bdc3ff0d8c1c (patch)
tree5fd108d4fe9551b9acbd0b9e64e8d9d71a8e1237 /Build
parent4cea6d3c09d26ce9eded9e65e02debb62674778e (diff)
-Added NuPack to build process
-Fixed deserializing structs when reusing existing values -Renamed Windows Phone 7 dll to Newtonsoft.Json.WindowsPhone.dll
Diffstat (limited to 'Build')
-rw-r--r--Build/Newtonsoft.Json.nuspec12
-rw-r--r--Build/build.ps134
2 files changed, 38 insertions, 8 deletions
diff --git a/Build/Newtonsoft.Json.nuspec b/Build/Newtonsoft.Json.nuspec
new file mode 100644
index 0000000..9509ee0
--- /dev/null
+++ b/Build/Newtonsoft.Json.nuspec
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<package>
+ <metadata>
+ <id>Newtonsoft.Json</id>
+ <version>3.5.8</version>
+ <authors>
+ <author>James Newton-King</author>
+ </authors>
+ <description>Json.NET is a popular high-performance JSON framework for .NET</description>
+ <language>en-US</language>
+ </metadata>
+</package> \ No newline at end of file
diff --git a/Build/build.ps1 b/Build/build.ps1
index 05f44f7..8b50a9d 100644
--- a/Build/build.ps1
+++ b/Build/build.ps1
@@ -4,6 +4,7 @@
$signAssemblies = $false
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
$buildDocumentation = $false
+ $buildNuPackage = $true
$baseDir = resolve-path ..
$buildDir = "$baseDir\Build"
@@ -13,11 +14,11 @@
$releaseDir = "$baseDir\Release"
$workingDir = "$baseDir\Working"
$builds = @(
- @{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="DotNet"; Framework="net-4.0"},
- @{Name = "Newtonsoft.Json.Phone"; TestsName = $null; Constants="SILVERLIGHT;WINDOWS_PHONE"; FinalDir="Phone"; Framework="net-4.0"},
- @{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; Framework="net-2.0"},
- @{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="DotNet20"; Framework="net-2.0"},
- @{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; Constants="NET35"; FinalDir="DotNet35"; Framework="net-2.0"}
+ @{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="Net"; NuPackDir = "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.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; NuPackDir = "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.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="Net20"; NuPackDir = "20"; Framework="net-2.0"}
)
}
@@ -55,11 +56,11 @@ task Build -depends Clean {
# Merge LinqBridge into .NET 2.0 build
task Merge -depends Build {
- $binaryDir = "$sourceDir\Newtonsoft.Json\bin\Release\DotNet20"
+ $binaryDir = "$sourceDir\Newtonsoft.Json\bin\Release\Net20"
MergeAssembly "$binaryDir\Newtonsoft.Json.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
del $binaryDir\LinqBridge.dll
- $binaryDir = "$sourceDir\Newtonsoft.Json.Tests\bin\Release\DotNet20"
+ $binaryDir = "$sourceDir\Newtonsoft.Json.Tests\bin\Release\Net20"
MergeAssembly "$binaryDir\Newtonsoft.Json.Tests.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
MergeAssembly "$binaryDir\Newtonsoft.Json.Net20.dll" $signKeyPath "$binaryDir\LinqBridge.dll"
del $binaryDir\LinqBridge.dll
@@ -77,11 +78,28 @@ task Package -depends Merge {
if ($buildDocumentation)
{
- exec { msbuild "/t:Clean;Rebuild" /p:Configuration=Release "/p:DocumentationSourcePath=$workingDir\Package\Bin\DotNet" $docDir\doc.shfbproj } "Error building documentation. Check that you have Sandcastle, Sandcastle Help File Builder and HTML Help Workshop installed."
+ exec { msbuild "/t:Clean;Rebuild" /p:Configuration=Release "/p:DocumentationSourcePath=$workingDir\Package\Bin\Net" $docDir\doc.shfbproj } "Error building documentation. Check that you have Sandcastle, Sandcastle Help File Builder and HTML Help Workshop installed."
move -Path $workingDir\Documentation\Documentation.chm -Destination $workingDir\Package\Documentation.chm
move -Path $workingDir\Documentation\LastBuild.log -Destination $workingDir\Documentation.log
}
+ if ($buildNuPackage)
+ {
+ New-Item -Path $workingDir\NuPack -ItemType Directory
+ Copy-Item -Path "$buildDir\Newtonsoft.Json.nuspec" -Destination $workingDir\NuPack\Newtonsoft.Json.nuspec -recurse
+
+ foreach ($build in $builds)
+ {
+ $name = $build.TestsName
+ $finalDir = $build.FinalDir
+ $frameworkDir = $build.NuPackDir
+
+ Copy-Item -Path "$sourceDir\Newtonsoft.Json\bin\Release\$finalDir" -Destination $workingDir\NuPack\lib\$frameworkDir -recurse
+ }
+
+ exec { .\Tools\NuPack\NuPack.exe $workingDir\NuPack\Newtonsoft.Json.nuspec }
+ move -Path .\*.nupkg -Destination $workingDir\NuPack
+ }
Copy-Item -Path $docDir\readme.txt -Destination $workingDir\Package\
Copy-Item -Path $docDir\versions.txt -Destination $workingDir\Package\Bin\