-
Notifications
You must be signed in to change notification settings - Fork 0
/
aspnet35.build
368 lines (295 loc) · 18.1 KB
/
aspnet35.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<?xml version="1.0" ?>
<project name="umbraco" default="test" basedir=".">
<description>Build the umbraco 4.6 alpha Application for asp.net 3.5</description>
<property name="nant.settings.currentframework" value="net-2.0" />
<!-- filenames and directories, generally won't change -->
<property name="web.dir" value="D:\inetpub\wwwroot\v4.umbraco.org" />
<property name="public.dir" value="D:\inetpub\wwwroot\nightlies\umbraco 4.6 for asp.net 3.5" />
<property name="root.dir" value="${directory::get-current-directory()}" />
<property name="source.dir" value="${root.dir}\umbraco\presentation" />
<property name="build.dir" value="${root.dir}\build" />
<property name="dlls.dir" value="${root.dir}\foreign dlls" />
<property name="build.version" value="4.6 Alpha"/>
<property name="docs.dir" value="${root.dir}\docs" />
<property name="win.dir" value="c:\WINDOWS" />
<property name="Webdeploy.dir" value="C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0" />
<!-- YUI -->
<property name="YUICompressor.dir" value="D:\inetpub\wwwroot\ccnet\buildTools\YUI" />
<target name="build" depends="init">
<!-- set everything to writable-->
<attrib normal="true" readonly="false">
<fileset basedir="${root.dir}">
<include name="**/*" />
</fileset>
</attrib>
<!-- Remove those damn DLR dlls that might be left behind by careless devs...-->
<!-- They will get added again after build is completed, no worries no dependencies during build-->
<delete>
<fileset>
<include name="${source.dir}\bin\IronPython.dll" />
<include name="${source.dir}\bin\IronPython.Modules.dll" />
<include name="${source.dir}\bin\IronRuby.dll" />
<include name="${source.dir}\bin\IronRuby.Libraries.dll" />
<include name="${source.dir}\bin\IronRuby.Libraries.Yaml.dll" />
<include name="${source.dir}\bin\Microsoft.Dynamic.dll" />
<include name="${source.dir}\bin\Microsoft.ScriptinG.Core.dll" />
<include name="${source.dir}\bin\Microsoft.Scripting.Debugging.dll" />
<include name="${source.dir}\bin\Microsoft.Scripting.dll" />
<include name="${source.dir}\bin\Microsoft.Scripting.ExtensionAttribute.dll" />
</fileset>
</delete>
<exec program="${win.dir}\microsoft.net\framework\v4.0.30319\msbuild.exe">
<arg value="${root.dir}\umbraco.sln" />
<arg value="/v:n" />
<arg value="/p:WarningLevel=0" />
<arg value="/p:ToolsVersion=3.5" />
</exec>
<exec program="${win.dir}\microsoft.net\framework\v2.0.50727\aspnet_compiler.exe" commandline="-f -u -p umbraco/presentation -v / "${build.dir}""/>
</target>
<!-- Directories and files -->
<target name="directories" depends="build">
<!-- setup docs files -->
<mkdir dir="${docs.dir}" />
<copy todir="${docs.dir}">
<fileset basedir="${build.dir}\bin">
<include name="*.xml" />
</fileset>
</copy>
<!-- asp.net 2.0 SP1 DLR dlls -->
<delete>
<fileset>
<include name="${build.dir}\bin\Microsoft.Scripting.*" />
<include name="${build.dir}\bin\Microsoft.Dynamic.*" />
<include name="${build.dir}\bin\IronPython.*" />
<include name="${build.dir}\bin\IronRuby.*" />
</fileset>
</delete>
<copy todir="${build.dir}\bin">
<fileset basedir="${dlls.dir}\DLR 2.0 SP1">
<include name="*.dll" />
<exclude name="Microsoft.Scripting.ExtensionAttribute.dll" />
</fileset>
</copy>
<!--standard web.config-->
<copy file="${root.dir}\aspnet35.config" tofile="${build.dir}\web.config" failonerror="false" overwrite="true"/>
<!--standard /config files-->
<copy file="${root.dir}\config templates\config\404handlers.config" tofile="${build.dir}\config\404handlers.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\dashboard.config" tofile="${build.dir}\config\dashboard.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\formhandlers.config" tofile="${build.dir}\config\formhandlers.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\metablogconfig.config" tofile="${build.dir}\config\metablogconfig.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\restextensions.config" tofile="${build.dir}\config\restextensions.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\xsltextensions.config" tofile="${build.dir}\config\xsltextensions.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\tinymceconfig.config" tofile="${build.dir}\config\tinymceconfig.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\umbracosettings.config" tofile="${build.dir}\config\umbracosettings.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\urlrewriting.config" tofile="${build.dir}\config\urlrewriting.config" failonerror="false" overwrite="true"/>
<!-- new 4.1 files -->
<copy file="${root.dir}\config templates\config\ClientDependency.config" tofile="${build.dir}\config\ClientDependency.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\ExamineSettings.config" tofile="${build.dir}\config\ExamineSettings.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\ExamineIndex.config" tofile="${build.dir}\config\ExamineIndex.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\config\scripting.config" tofile="${build.dir}\config\scripting.config" failonerror="false" overwrite="true"/>
<!--standard /data/packages files-->
<copy file="${root.dir}\config templates\packages\installedPackages.config" tofile="${build.dir}\data\packages\installed\installedPackages.config" failonerror="false" overwrite="true"/>
<copy file="${root.dir}\config templates\packages\createdPackages.config" tofile="${build.dir}\data\packages\created\createdPackages.config" failonerror="false" overwrite="true"/>
<!-- Standard access.xml file-->
<copy file="${root.dir}\config templates\access.xml" tofile="${build.dir}\data\access.xml" failonerror="false" overwrite="true"/>
<!-- Standard create UI.xml-->
<copy file="${root.dir}\config templates\config\UI.xml" tofile="${build.dir}\umbraco\config\create\UI.xml" failonerror="false" overwrite="true"/>
<!-- Standard empty cache file -->
<copy file="${root.dir}\config templates\umbraco.config" tofile="${build.dir}\umbraco\data\umbraco.config" failonerror="false" overwrite="true"/>
<!-- Baseline Language file for translation tool -->
<copy file="${build.dir}\umbraco\config\lang\en.xml" tofile="${web.dir}\usercontrols\translation\langs\en.xml" failonerror="false" overwrite="true"/>
<!-- LINQ2UMB dll-->
<copy file="${root.dir}\LinqToUmbraco\src\umbraco.Linq\Core\bin\Debug - Fixed Version\umbraco.Linq.Core.dll" tofile="${build.dir}\bin\umbraco.Linq.Core.dll" failonerror="false" overwrite="true"/>
<delete dir="${build.dir}\webservices" />
<delete dir="${build.dir}\umbracoBase" />
<delete dir="${build.dir}\Web References" />
<delete dir="${build.dir}\obj" />
<delete dir="${build.dir}\properties" />
<delete dir="${build.dir}\css" />
<delete dir="${build.dir}\masterpages" />
<delete dir="${build.dir}\scripts" />
<delete dir="${build.dir}\python" />
<delete dir="${build.dir}\xslt" />
<delete dir="${build.dir}\usercontrols" />
<delete>
<fileset>
<include name="${build.dir}/**/*.build" />
<include name="${build.dir}/**/*.csproj" />
<include name="${build.dir}/**/*.vspscc" />
<include name="${build.dir}/**/*.scc" />
<include name="${build.dir}/**/*.sln" />
<include name="${build.dir}/**/*.compiled" />
<include name="${build.dir}/**/*.resx" />
<include name="${build.dir}/**/*.user" />
<include name="${build.dir}/**/*.pdb" />
<include name="${build.dir}/PrecompiledApp.config" />
<include name="${build.dir}/web.config.template" />
<include name="${build.dir}/*.xslt" />
<include name="${build.dir}/web.STANDARD.config" />
<include name="${build.dir}/site.py" />
</fileset>
</delete>
<!-- standard folders -->
<mkdir dir="${build.dir}\App_Code" />
<mkdir dir="${build.dir}\App_Data" />
<mkdir dir="${build.dir}\App_Data\ClientDependency" />
<mkdir dir="${build.dir}\App_Data\ExamineIndexes" />
<mkdir dir="${build.dir}\media" />
<mkdir dir="${build.dir}\masterpages" />
<mkdir dir="${build.dir}\scripts" />
<mkdir dir="${build.dir}\css" />
<mkdir dir="${build.dir}\python" />
<mkdir dir="${build.dir}\xslt" />
<mkdir dir="${build.dir}\usercontrols" />
</target>
<!-- Minify -->
<target name="minify" description="minify JS files" depends="directories">
<fileset basedir="${build.dir}" id="jsFileSet">
<include name="umbraco/css/*.css"/>
<include name="umbraco/js/**/*.js"/>
<include name="umbraco_client/**/*.js"/>
<include name="umbraco_client/**/*.css"/>
</fileset>
<property name="js_files" value=""/>
<foreach item="File" property="file">
<in>
<items refid="jsFileSet"/>
</in>
<do>
<exec program="java" workingdir="${YUICompressor.dir}" failonerror="false">
<arg value="-jar" />
<arg value="yuicompressor.jar" />
<arg value="-o" />
<arg value="${file}.min" />
<arg value="${file}" />
</exec>
<move file="${file}.min" tofile="${file}" overwrite="true" failonerror="false"/>
</do>
</foreach>
</target>
<!-- Documentation -->
<target name="documentation" depends="directories">
<!-- Transformations -->
<property name="sandcastle.addfriendlyfilenames.xsl" value="${sandcastle.dir}\ProductionTransforms\AddFriendlyFilenames.xsl" />
<property name="sandcastle.reflectiontomanifest.xsl" value="${sandcastle.dir}\ProductionTransforms\ReflectionToManifest.xsl" />
<property name="sandcastle.buildassembler.config" value="${sandcastle.dir}\Presentation\wiki\configuration\sandcastle.config" />
<!-- Create a doc dir and move vs comment files to it-->
<mkdir dir="${docs.dir}" />
<copy todir="${docs.dir}">
<fileset basedir="${build.dir}\bin">
<include name="*.xml" />
</fileset>
</copy>
<!-- Create or Cleanup Working Directory -->
<mkdir dir="${sandcastle.workingdir}" if="${not directory::exists(sandcastle.workingdir)}" />
<delete>
<fileset basedir="${sandcastle.workingdir}">
<include name="**\*" />
</fileset>
</delete>
<copy file="${sandcastle.buildassembler.config}" tofile="${sandcastle.workingdir}\Sandcastle.config">
<filterchain>
<replacestring from="%DXROOT%\" to="${sandcastle.dir}" />
<replacestring from=".\comments.xml" to="${docs.dir}\*.xml" />
</filterchain>
</copy>
<!-- Run MRefBuilder (introspection on assemblies) to create basic Reflection XML -->
<exec program="${sandcastle.mrefbuilder}" workingdir="${sandcastle.workingdir}">
<arg value=""${build.dir}\bin\businesslogic.dll" " />
<arg value=""${build.dir}\bin\cms.dll" " />
<arg value=""${build.dir}\bin\controls.dll" " />
<arg value=""${build.dir}\bin\interfaces.dll" " />
<arg value=""${build.dir}\bin\umbraco.datalayer.dll" " />
<arg value=""${build.dir}\bin\umbraco.dll" " />
<arg value=""${build.dir}\bin\umbraco.editorcontrols.dll" " />
<arg value=""${build.dir}\bin\umbraco.providers.dll" " />
<arg value=""${build.dir}\bin\umbraco.webservices.dll" " />
<arg value="/out:reflection.org" />
</exec>
<!-- Regroup overloads -->
<exec program="${sandcastle.xsltransform}" workingdir="${sandcastle.workingdir}">
<arg value="reflection.org" />
<arg value="/xsl:"${sandcastle.addfriendlyfilenames.xsl}"" />
<arg value="/out:reflection.xml" />
</exec>
<exec program="${sandcastle.xsltransform}" workingdir="${sandcastle.workingdir}">
<arg value="reflection.org" />
<arg value="/xsl:"${sandcastle.reflectiontomanifest.xsl}"" />
<arg value="/out:manifest.xml" />
</exec>
<exec program="${sandcastle.buildassembler}" workingdir="${sandcastle.workingdir}">
<arg value="/config:Sandcastle.config" />
<arg value="manifest.xml" />
</exec>
</target>
<!-- do the full release with docs, minify and nightly file distribution -->
<target name="release" depends="zip,minify">
<property name="assembly.name" value="${ assemblyname::get-version( assemblyname::get-assembly-name('umbraco/presentation/bin/umbraco.dll') ) }"/>
<property name="release.filename" value="${root.dir}\build_${build.version}_${assembly.name}.zip" />
<mkdir dir="${public.dir}\${build.version}" />
<copy file="${release.filename}" tofile="${public.dir}\${build.version}\${assembly.name}.zip" />
</target>
<!-- do the full release with docs, minify and nightly file distribution -->
<target name="zip" depends="directories">
<property name="assembly.name" value="${ assemblyname::get-version( assemblyname::get-assembly-name('umbraco/presentation/bin/umbraco.dll') ) }"/>
<property name="release.filename" value="${root.dir}\build_${build.version}_${assembly.name}.zip" />
<zip zipfile="${release.filename}" includeemptydirs="true" >
<fileset basedir="${root.dir}">
<include name="build/*" />
<include name="build/**/*" />
</fileset>
</zip>
</target>
<!-- do a nightly build without the minification and docs -->
<target name="nightly" depends="zip">
<property name="assembly.name" value="${ assemblyname::get-version( assemblyname::get-assembly-name('umbraco/presentation/bin/umbraco.dll') ) }"/>
<property name="release.filename" value="${root.dir}\build_${build.version}_${assembly.name}.zip" />
<mkdir dir="${public.dir}\${build.version}" />
<copy file="${release.filename}" tofile="${public.dir}\${build.version}\${assembly.name}.zip" />
</target>
<!-- will produce the a clean /build folder and nothing else-->
<target name="test" depends="directories">
</target>
<target name="webPIRelease" depends="release,webPiFile">
<copy file="${root.dir}\webPi_sha.txt" tofile="${public.dir}\${build.version}\webPi_sha.txt" />
<copy file="${root.dir}\Umbraco_${build.version}_WebDeploy.zip" tofile="${public.dir}\${build.version}\Umbraco_${build.version}_WebDeploy.zip" />
</target>
<!-- do the webdeploy release for web PI-->
<target name="webPiFile" depends="directories">
<property name="webpi.dir" value="${root.dir}\deploy" />
<delete dir="${webpi.dir}\umbraco" />
<mkdir dir="${webpi.dir}" />
<mkdir dir="${webpi.dir}\umbraco" />
<copy todir="${webpi.dir}\umbraco" includeemptydirs="true" >
<fileset basedir="${root.dir}">
<include name="build/*" />
<include name="build/**/*" />
</fileset>
</copy>
<copy file="d:\webpiAssets\installSQL.sql" tofile="${webpi.dir}\installSQL.sql" failonerror="false"/>
<copy file="d:\webpiAssets\manifest.xml" tofile="${webpi.dir}\manifest.xml" failonerror="false"/>
<copy file="d:\webpiAssets\parameters.xml" tofile="${webpi.dir}\parameters.xml" failonerror="false"/>
<property name="webpi.filename" value="${root.dir}\Umbraco_${build.version}_WebDeploy.zip" />
<zip zipfile="${webpi.filename}" includeemptydirs="true" >
<fileset basedir="${webpi.dir}">
<include name="*" />
<include name="**/*" />
</fileset>
</zip>
<exec program="${win.dir}\hashMyFiles.exe">
<arg value="/file "${webpi.filename}"" />
<arg value="/stext "${root.dir}\webPi_sha.txt"" />
</exec>
</target>
<target name="init" description="init tasks for the build">
<!-- Clean the plugins dir any leftovers, only tinyMCE belongs in here -->
<delete>
<fileset>
<include name="${build.dir}\umbraco\plugins\*" />
<exclude name="${build.dir}\umbraco\plugins\tinymce3" />
</fileset>
</delete>
<delete dir="${build.dir}" />
<mkdir dir="${build.dir}" />
</target>
</project>