forked from protobuf-net/protobuf-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildkit35.build
149 lines (123 loc) · 8.26 KB
/
buildkit35.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="BuildKit"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This build file builds protobuf-net for CF 2.0, CF 3.5 and Silverlight 2.0;
It also packages all builds.
-->
<!-- See http://msbuildtasks.tigris.org -->
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<PropertyGroup>
<OutputDirectory>tmp</OutputDirectory>
</PropertyGroup>
<Target Name="BuildKit">
<!-- update the assembly / file versions with the last local revision -->
<SvnInfo LocalPath=".">
<Output TaskParameter="Revision" PropertyName="BuildRev" />
</SvnInfo>
<FileUpdate Files="protobuf-net\Properties\AssemblyInfo.cs"
Regex='(\[\s*assembly:\s*AssemblyVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
ReplacementText='$1.$2.$(BuildRev)$5' />
<FileUpdate Files="protobuf-net\Properties\AssemblyInfo.cs"
Regex='(\[\s*assembly:\s*AssemblyFileVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
ReplacementText='$1.$2.$(BuildRev)$5' />
<FileUpdate Files="protobuf-net.Extensions\Properties\AssemblyInfo.cs"
Regex='(\[\s*assembly:\s*AssemblyVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
ReplacementText='$1.$2.$(BuildRev)$5' />
<FileUpdate Files="protobuf-net.Extensions\Properties\AssemblyInfo.cs"
Regex='(\[\s*assembly:\s*AssemblyFileVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
ReplacementText='$1.$2.$(BuildRev)$5' />
<FileUpdate Files="ProtoGen\Properties\AssemblyInfo.cs"
Regex='(\[\s*assembly:\s*AssemblyVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
ReplacementText='$1.$2.$(BuildRev)$5' />
<FileUpdate Files="ProtoGen\Properties\AssemblyInfo.cs"
Regex='(\[\s*assembly:\s*AssemblyFileVersion\(\s*"[^\.]+\.[^\.]+)\.([^\.]+)(\.)([^\.]+)("\)\s*\])'
ReplacementText='$1.$2.$(BuildRev)$5' />
<Copy DestinationFolder="$(OutputDirectory)" SourceFiles="Licence.txt"/>
<Copy DestinationFolder="$(OutputDirectory)" SourceFiles="..\wiki\ChangeHistory.wiki"/>
<RemoveDir Directories="$(OutputDirectory)"/>
<MakeDir Directories="$(OutputDirectory)"/>
<MakeDir Directories="$(OutputDirectory)\Zips"/>
<!-- build mono using nant -->
<RemoveDir Directories="protobuf-net-mono\bin; protobuf-net-mono\bin\docs"/>
<Exec Command=""%ProgramFiles%\Mono-2.6\share\NAnt\bin\NAnt" -buildfile:protobuf-net-mono\protobuf-net-mono.build -D:build.release=true" />
<!-- build .NET 2.0 using the C# 2.0 compiler -->
<RemoveDir Directories="protobuf-net\obj; protobuf-net\bin"/>
<RemoveDir Directories="protogen\obj; protogen\bin"/>
<Exec Command=""%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\MSBuild" buildkit20.build" />
<!-- build .NET 3.0 using the C# 3.0 compiler -->
<RemoveDir Directories="protobuf-net\obj; protobuf-net\bin"/>
<RemoveDir Directories="protogen\obj; protogen\bin"/>
<RemoveDir Directories="protobuf-net.Extensions\obj; protobuf-net.Extensions\bin"/>
<MSBuild Projects="LateLoaded\LateLoaded.csproj" Targets="Rebuild" Properties="Configuration=Release"/>
<MSBuild Projects="protogen\protogen.csproj" Properties="OutputPath=..\$(OutputDirectory)\NET30; Configuration=Release" Targets="Rebuild"/>
<MSBuild Projects="protobuf-net.Extensions\protobuf-net.Extensions.csproj" Properties="OutputPath=..\$(OutputDirectory)\NET30; Configuration=Release" Targets="Rebuild"/>
<!-- build for compact framework -->
<RemoveDir Directories="protobuf-net-CF20\obj; protobuf-net-CF20\bin"/>
<RemoveDir Directories="protobuf-net-CF35\obj; protobuf-net-CF35\bin"/>
<RemoveDir Directories="protobuf-net.Extensions-CF35\obj; protobuf-net.Extensions-CF35\bin"/>
<MSBuild Projects="protobuf-net-CF20\protobuf-net-CF20.csproj" Properties="OutputPath=..\$(OutputDirectory)\CF20; Configuration=Release" Targets="Rebuild"/>
<MSBuild Projects="protobuf-net-CF35\protobuf-net-CF35.csproj" Properties="OutputPath=..\$(OutputDirectory)\CF35; Configuration=Release" Targets="Rebuild"/>
<MSBuild Projects="protobuf-net.Extensions-CF35\protobuf-net.Extensions-CF35.csproj" Properties="OutputPath=..\$(OutputDirectory)\CF35; Configuration=Release" Targets="Rebuild"/>
<!-- build for Silverlight -->
<RemoveDir Directories="protobuf-net_Silverlight\obj; protobuf-net_Silverlight\bin"/>
<MSBuild Projects="protobuf-net_Silverlight\protobuf-net_Silverlight.csproj" Properties="OutputPath=..\$(OutputDirectory)\SILVER20_tmp; Configuration=Release" Targets="Rebuild"/>
<MakeDir Directories="$(OutputDirectory)\SILVER20"/>
<Copy DestinationFolder="$(OutputDirectory)\SILVER20" SourceFiles="$(OutputDirectory)\SILVER20_tmp\Licence.txt"/>
<Copy DestinationFolder="$(OutputDirectory)\SILVER20" SourceFiles="$(OutputDirectory)\SILVER20_tmp\protobuf-net.dll"/>
<Copy DestinationFolder="$(OutputDirectory)\SILVER20" SourceFiles="$(OutputDirectory)\SILVER20_tmp\protobuf-net.pdb"/>
<Copy DestinationFolder="$(OutputDirectory)\SILVER20" SourceFiles="$(OutputDirectory)\SILVER20_tmp\protobuf-net.xml"/>
<RemoveDir Directories="$(OutputDirectory)\SILVER20_tmp"/>
<MakeDir Directories="$(OutputDirectory)\MONO"/>
<Copy DestinationFolder="$(OutputDirectory)\MONO" SourceFiles="Licence.txt"/>
<Copy DestinationFolder="$(OutputDirectory)\MONO" SourceFiles="protobuf-net-mono\bin\Release\protobuf-net.dll"/>
<Copy DestinationFolder="$(OutputDirectory)\MONO" SourceFiles="protobuf-net-mono\docs\protobuf-net.xml"/>
<!-- zip the various outputs -->
<ItemGroup>
<ZipN20 Include="$(OutputDirectory)\NET20\*.*" />
<ZipN30 Include="$(OutputDirectory)\NET30\*.*" />
<ZipCF20 Include="$(OutputDirectory)\CF20\*.*" />
<ZipCF35 Include="$(OutputDirectory)\CF35\*.*" />
<ZipS20 Include="$(OutputDirectory)\SILVER20\*.*" />
<ZipMONO Include="$(OutputDirectory)\MONO\*.*" />
</ItemGroup>
<Zip WorkingDirectory="$(OutputDirectory)\MONO"
Files="@(ZipMONO)"
ZipFileName="$(OutputDirectory)\Zips\MONO.zip" />
<RemoveDir Directories="$(OutputDirectory)\MONO"/>
<Zip WorkingDirectory="$(OutputDirectory)\NET20"
Files="@(ZipN20)"
ZipFileName="$(OutputDirectory)\Zips\NET20.zip" />
<Zip WorkingDirectory="$(OutputDirectory)\NET30"
Files="@(ZipN30)"
ZipFileName="$(OutputDirectory)\Zips\NET30.zip" />
<RemoveDir Directories="$(OutputDirectory)\NET20; $(OutputDirectory)\NET30"/>
<Zip WorkingDirectory="$(OutputDirectory)\CF20"
Files="@(ZipCF20)"
ZipFileName="$(OutputDirectory)\Zips\CF20.zip" />
<Zip WorkingDirectory="$(OutputDirectory)\CF35"
Files="@(ZipCF35)"
ZipFileName="$(OutputDirectory)\Zips\CF35.zip" />
<RemoveDir Directories="$(OutputDirectory)\CF20; $(OutputDirectory)\CF35"/>
<Zip WorkingDirectory="$(OutputDirectory)\SILVER20"
Files="@(ZipS20)"
ZipFileName="$(OutputDirectory)\Zips\SILVER20.zip" />
<RemoveDir Directories="$(OutputDirectory)\SILVER20"/>
<!-- package the separate archives into a single master package -->
<ItemGroup>
<ZipAll Include="$(OutputDirectory)\Zips\*.*" />
</ItemGroup>
<Zip WorkingDirectory="$(OutputDirectory)\Zips"
Files="@(ZipAll)"
ZipFileName="$(OutputDirectory)\protobuf-net r$(BuildRev).zip" />
<RemoveDir Directories="$(OutputDirectory)\Zips"/>
<!-- build the test project -->
<RemoveDir Directories="Examples\obj; Examples\bin"/>
<MSBuild Projects="Examples\Examples.csproj" Properties="OutputPath=..\$(OutputDirectory)\Test; Configuration=Release" Targets="Rebuild"/>
<!-- execute the unit tests (do this last as it is slower; allows interruption
and simple visibility of test results -->
<NUnit Assemblies="$(OutputDirectory)\Test\Examples.exe"
ToolPath="C:\Program Files\NUnit 2.5.2\bin\net-2.0" />
<RemoveDir Directories="$(OutputDirectory)\Test"/>
<Message Text="protobuf r$(BuildRev); build/package/test complete"/>
</Target>
</Project>