-
Notifications
You must be signed in to change notification settings - Fork 196
/
project.build
214 lines (196 loc) · 9 KB
/
project.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?xml version="1.0"?>
<project name="pickles" default="zip" basedir=".">
<description>Builds and tests the Pickles project</description>
<!-- set the major and minor version number here -->
<property name="version.major" value="0" />
<property name="version.minor" value="8" />
<!-- set build number from continuous integration tool -->
<if test="${environment::variable-exists('BUILD_NUMBER')}">
<property name="build.number" value="${environment::get-variable('BUILD_NUMBER')}" />
</if>
<ifnot test="${property::exists('build.number')}">
<property name="build.number" value="0" />
</ifnot>
<!-- Set revision number from source control ... note that for git this is difficult to do because it only uses SHA hashes for commits -->
<if test="${environment::variable-exists('SVN_REVISION')}">
<property name="revision" value="${environment::get-variable('SVN_REVISION')}" />
</if>
<if test="${environment::variable-exists('BZR_REVISION')}">
<property name="revision" value="${environment::get-variable('BZR_REVISION')}" />
</if>
<ifnot test="${property::exists('revision')}">
<property name="revision" value="0" />
</ifnot>
<property name="version" value="${version.major}.${version.minor}.${build.number}.0" />
<property name="msbuild.dir" value="C:\Windows\Microsoft.NET\Framework\v4.0.30319" />
<property name="ilmerge.dir" value="${environment::get-variable('ProgramFiles')}\Microsoft\ILMerge" />
<property name="nuget.dir" value="src\Pickles\.nuget" />
<property name="framework.dir" value="${msbuild.dir}" />
<property name="assemblies.dir" value="C:\dev\pickles\src\Pickles\Pickles.CommandLine\bin\Release" />
<property name="assemblies.console.dir" value="src\Pickles\Pickles.CommandLine\bin\Release" />
<property name="assemblies.msbuild.dir" value="src\Pickles\Pickles.MSBuild\bin\Release" />
<property name="assemblies.nant.dir" value="src\Pickles\Pickles.NAnt\bin\Release" />
<property name="assemblies.powershell.dir" value="src\Pickles\Pickles.Powershell\bin\Release" />
<property name="assemblies.gui.dir" value="src\Pickles\Pickles.UserInterface\bin\Release" />
<property name="nuspec.powershell.dir" value="src\Pickles\Pickles.PowerShell\Pickles.nuspec" />
<property name="merged.dir" value="merged" />
<property name="deploy.dir" value="deploy" />
<property name="report.dir" value="reports" />
<property name="report.nunit.dir" value="${report.dir}\nunit" />
<target name="init">
<mkdir dir="${deploy.dir}" />
<mkdir dir="${merged.dir}" />
<mkdir dir="${report.nunit.dir}" />
</target>
<target name="set" depends="init">
<exec program="tools\AssemblyInfoUtil.exe">
<arg value="-setver:${version}" />
<arg value="src\Pickles\VersionInfo.cs" />
</exec>
</target>
<target name="build" depends="set">
<exec program="msbuild.exe" basedir="${msbuild.dir}">
<arg value="src\Pickles\Pickles.sln" />
<arg value="/p:Configuration=Release" />
<arg value="/p:NoWarn=1591 3001 3002 3003 3005 3008 3009" />
<arg value="/l:FileLogger,Microsoft.Build.Engine;logfile=build.log;verbosity=detailed;encoding=utf-8" />
</exec>
</target>
<target name="test" depends="build">
<exec program="nunit-console.exe" basedir="src\Pickles\packages\NUnit.Runners.2.6.1\tools">
<arg value="/xml:${report.nunit.dir}\results.xml" />
<arg value=".\src\Pickles\Pickles.Test\bin\Release\Pickles.Test.dll" />
</exec>
</target>
<target name="merge" depends="build">
<delete>
<fileset>
<include name="${merged.dir}\merge.*.log" />
</fileset>
</delete>
<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/out=${merged.dir}\Pickles.exe"/>
<arg value="/target=exe"/>
<arg value="/ndebug"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.exe.log" />
<arg value="${assemblies.console.dir}\Pickles.CommandLine.exe"/>
<arg value="${assemblies.console.dir}\*.dll"/>
</exec>
<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/out=${merged.dir}\Pickles.MSBuild.Tasks.dll"/>
<arg value="/target=dll"/>
<arg value="/ndebug"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.msbuild.log" />
<arg value="${assemblies.msbuild.dir}\Pickles.MSBuild.Tasks.dll"/>
<arg value="${assemblies.msbuild.dir}\*.dll"/>
</exec>
<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/out=${merged.dir}\Pickles.NAnt.Tasks.dll"/>
<arg value="/target=dll"/>
<arg value="/ndebug"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.nant.log" />
<arg value="${assemblies.nant.dir}\Pickles.NAnt.Tasks.dll"/>
<arg value="${assemblies.nant.dir}\*.dll"/>
</exec>
<exec program="ilmerge.exe" basedir="${ilmerge.dir}">
<arg value="/out=${merged.dir}\Pickles.PowerShell.dll"/>
<arg value="/target=dll"/>
<arg value="/ndebug"/>
<arg value="/wildcards"/>
<arg value="/allowDup"/>
<arg value="/log:${merged.dir}\merge.powershell.log" />
<arg value="${assemblies.powershell.dir}\Pickles.Powershell.dll"/>
<arg value="${assemblies.powershell.dir}\*.dll"/>
</exec>
</target>
<target name="pack" depends="build">
<exec program="nuget.exe" basedir="${nuget.dir}">
<arg value="Pack"/>
<arg value="-Version"/>
<arg value="${version}" />
<arg value="-OutputDirectory"/>
<arg value="${deploy.dir}"/>
<arg value="${nuspec.powershell.dir}"/>
</exec>
</target>
<target name="zip" depends="test">
<zip zipfile="${deploy.dir}\pickles-${version}.zip">
<fileset basedir="${assemblies.console.dir}" prefix="pickles-${version}\exe">
<include name="**/*" />
<exclude name="**/*.xml" />
<exclude name="**/IKVM.AWT.WinForms.dll" />
<exclude name="**/IKVM.OpenJDK.Beans.dll" />
<exclude name="**/IKVM.OpenJDK.Jdbc.dll" />
<exclude name="**/IKVM.OpenJDK.Media.dll" />
<exclude name="**/IKVM.OpenJDK.Misc.dll" />
<exclude name="**/IKVM.OpenJDK.Naming.dll" />
<exclude name="**/IKVM.OpenJDK.Remoting.dll" />
<exclude name="**/IKVM.OpenJDK.SwingAWT.dll" />
<exclude name="**/IKVM.OpenJDK.XML.API.dll" />
<exclude name="**/IKVM.Runtime.JNI.dll" />
</fileset>
<fileset basedir="${assemblies.msbuild.dir}" prefix="pickles-${version}\msbuild">
<include name="**/*" />
<exclude name="**/*.xml" />
<exclude name="**/IKVM.AWT.WinForms.dll" />
<exclude name="**/IKVM.OpenJDK.Beans.dll" />
<exclude name="**/IKVM.OpenJDK.Jdbc.dll" />
<exclude name="**/IKVM.OpenJDK.Media.dll" />
<exclude name="**/IKVM.OpenJDK.Misc.dll" />
<exclude name="**/IKVM.OpenJDK.Naming.dll" />
<exclude name="**/IKVM.OpenJDK.Remoting.dll" />
<exclude name="**/IKVM.OpenJDK.SwingAWT.dll" />
<exclude name="**/IKVM.OpenJDK.XML.API.dll" />
<exclude name="**/IKVM.Runtime.JNI.dll" />
</fileset>
<fileset basedir="${assemblies.nant.dir}" prefix="pickles-${version}\nant">
<include name="**/*" />
<exclude name="**/*.xml" />
<exclude name="**/IKVM.AWT.WinForms.dll" />
<exclude name="**/IKVM.OpenJDK.Beans.dll" />
<exclude name="**/IKVM.OpenJDK.Jdbc.dll" />
<exclude name="**/IKVM.OpenJDK.Media.dll" />
<exclude name="**/IKVM.OpenJDK.Misc.dll" />
<exclude name="**/IKVM.OpenJDK.Naming.dll" />
<exclude name="**/IKVM.OpenJDK.Remoting.dll" />
<exclude name="**/IKVM.OpenJDK.SwingAWT.dll" />
<exclude name="**/IKVM.OpenJDK.XML.API.dll" />
<exclude name="**/IKVM.Runtime.JNI.dll" />
</fileset>
<fileset basedir="${assemblies.powershell.dir}" prefix="pickles-${version}\powershell">
<include name="**/*" />
<exclude name="**/*.xml" />
<exclude name="**/IKVM.AWT.WinForms.dll" />
<exclude name="**/IKVM.OpenJDK.Beans.dll" />
<exclude name="**/IKVM.OpenJDK.Jdbc.dll" />
<exclude name="**/IKVM.OpenJDK.Media.dll" />
<exclude name="**/IKVM.OpenJDK.Misc.dll" />
<exclude name="**/IKVM.OpenJDK.Naming.dll" />
<exclude name="**/IKVM.OpenJDK.Remoting.dll" />
<exclude name="**/IKVM.OpenJDK.SwingAWT.dll" />
<exclude name="**/IKVM.OpenJDK.XML.API.dll" />
<exclude name="**/IKVM.Runtime.JNI.dll" />
</fileset>
<fileset basedir="${assemblies.gui.dir}" prefix="pickles-${version}\gui">
<include name="**/*" />
<exclude name="**/*.xml" />
<exclude name="**/IKVM.AWT.WinForms.dll" />
<exclude name="**/IKVM.OpenJDK.Beans.dll" />
<exclude name="**/IKVM.OpenJDK.Jdbc.dll" />
<exclude name="**/IKVM.OpenJDK.Media.dll" />
<exclude name="**/IKVM.OpenJDK.Misc.dll" />
<exclude name="**/IKVM.OpenJDK.Naming.dll" />
<exclude name="**/IKVM.OpenJDK.Remoting.dll" />
<exclude name="**/IKVM.OpenJDK.SwingAWT.dll" />
<exclude name="**/IKVM.OpenJDK.XML.API.dll" />
<exclude name="**/IKVM.Runtime.JNI.dll" />
</fileset>
</zip>
</target>
</project>