-
Notifications
You must be signed in to change notification settings - Fork 8
/
Cuyahoga.build
268 lines (247 loc) · 10.7 KB
/
Cuyahoga.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
<?xml version="1.0" encoding="utf-8" ?>
<project name="Cuyahoga" default="build" basedir="." xmlns="http://nant.sf.net/release/0.85/nant.xsd">
<property name="root.dir" value="." />
<include buildfile="${root.dir}/common.xml" />
<fileset id="buildfiles.all">
<!-- Files have to be in dependency order -->
<include name="Core/Cuyahoga.Core.build" />
<include name="ServerControls/Cuyahoga.ServerControls.build" />
<include name="Web/Cuyahoga.Web.build" />
<include name="Modules/Cuyahoga.Modules.build" />
<include name="Cuyahoga.Modules.Articles/Cuyahoga.Modules.Articles.build" />
<include name="Cuyahoga.Modules.Downloads/Cuyahoga.Modules.Downloads.build" />
<include name="Cuyahoga.Modules.RemoteContent/Cuyahoga.Modules.RemoteContent.build" />
<include name="Cuyahoga.Modules.Forum/Cuyahoga.Modules.Forum.build" />
<include name="Cuyahoga.Modules.Flash/Cuyahoga.Modules.Flash.build" />
</fileset>
<fileset id="buildfiles.deploy">
<!-- Include all buildfiles here that have a deploy target -->
<include name="Web/Cuyahoga.Web.build" />
<include name="Modules/Cuyahoga.Modules.build" />
<include name="Cuyahoga.Modules.Articles/Cuyahoga.Modules.Articles.build" />
<include name="Cuyahoga.Modules.Downloads/Cuyahoga.Modules.Downloads.build" />
<include name="Cuyahoga.Modules.RemoteContent/Cuyahoga.Modules.RemoteContent.build" />
<include name="Cuyahoga.Modules.Forum/Cuyahoga.Modules.Forum.build" />
<include name="Cuyahoga.Modules.Flash/Cuyahoga.Modules.Flash.build" />
</fileset>
<target name="build"
depends="init copy-referenced-assemblies"
description="Builds Cuyahoga in the current configuration">
<nant target="build">
<buildfiles refid="buildfiles.all" />
</nant>
</target>
<target name="rebuild" description="Rebuilds Cuyahoga in the current configuration" depends="init recreate-build-directory build" />
<target name="init" depends="common.init">
<mkdir dir="${build.dir}" />
<call target="common.find-svninfo" />
</target>
<target name="clean" description="Deletes current build artifacts" depends="common.init">
<delete dir="${build.dir}" failonerror="false" />
<delete>
<fileset basedir="${build.base.dir}">
<include name="*.*" />
</fileset>
</delete>
</target>
<target name="cleanall" description="Deletes all build artifacts" depends="common.init">
<echo message="Deleting all builds from all configurations" />
<delete dir="${build.base.dir}" failonerror="false" />
<call target="clean-vs" />
</target>
<target name="recreate-build-directory">
<echo message="Current Directory is ${project::get-base-directory()}" />
<echo message="Build Directory is ${build.dir}" />
<!-- Prepare build directory -->
<delete dir="${build.dir}" failonerror="false" />
<mkdir dir="${build.dir}" />
<call target="copy-referenced-assemblies" />
<property name="build.rebuild" value="true" />
</target>
<target name="copy-referenced-assemblies">
<!-- Copy framework-neutral libraries -->
<copy todir="${build.bin.dir}" >
<fileset basedir="${lib.dir}">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
</fileset>
</copy>
<!-- Copy assemblies from nuget packages -->
<foreach item="String" delim=" " property="package-basedir" in="${lib.nuget.dir.log4net} ${lib.nuget.dir.castle.core} ${lib.nuget.dir.castle.windsor} ${lib.nuget.dir.iesi.collections} ${lib.nuget.dir.nhibernate}">
<copy todir="${build.bin.dir}" >
<fileset basedir="${package-basedir}">
<include name="*.dll" />
<include name="*.xml" />
</fileset>
</copy>
</foreach>
<!-- Copy family-specific libraries -->
<!--
The build of log4net works just fine for all versions of .NET.
When they do get framework specific extensions then we
can just move them to the framework specific section
-->
<copy todir="${build.bin.dir}">
<fileset basedir="${lib.family.dir}">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
</fileset>
</copy>
<!-- Copy framework-specific libraries -->
<copy todir="${build.bin.dir}">
<fileset basedir="${lib.framework.dir}">
<include name="*.dll" />
<include name="*.xml" />
<include name="*.license.txt" />
</fileset>
</copy>
</target>
<target name="generate-assemblyinfo"
depends="init"
description="Generate AssemblyInfo files">
<property name="visual-studio" value="true" />
<nant target="generate-assemblyinfo">
<buildfiles refid="buildfiles.all" />
</nant>
</target>
<target name="build-all-frameworks" depends="init">
<!-- Save the current framework -->
<property name="current.framework.saved" value="${nant.settings.currentframework}" />
<!-- Execute build for each framework -->
<foreach item="String" delim=" " property="framework" in="net-2.0 net-4.0 mono-2.0">
<call target="set-${framework}-framework-configuration" />
<call target="build" />
</foreach>
<!-- Reset the current framework to the saved value -->
<call target="set-${current.framework.saved}-framework-configuration" />
</target>
<target name="deploy" depends="build" description="Deploys the website to the deployment directory">
<nant target="deploy">
<buildfiles refid="buildfiles.deploy" />
</nant>
<copy todir="${build.dir}">
<fileset>
<include name="*.txt" />
</fileset>
</copy>
</target>
<target name="sdkdoc" depends="init" description="Generates MSDN style documentation">
<mkdir dir="${build.dir}/doc/sdk" />
<ndoc>
<assemblies basedir="${build.dir}/bin">
<include name="Cuyahoga.*.dll" />
</assemblies>
<documenters>
<documenter name="MSDN">
<property name="OutputDirectory" value="${build.dir}/doc/sdk" />
<property name="HtmlHelpName" value="CuyahogaReference" />
<property name="IncludeFavorites" value="False" />
<property name="Title" value="Cuyahoga Class Library - v.${project.version}" />
<property name="SplitTOCs" value="False" />
<property name="DefaulTOC" value="" />
<property name="IncludeHierarchy" value="True" />
<property name="ShowVisualBasic" value="False" />
<property name="RootPageContainsNamespaces" value="True" />
<property name="SortTOCByNamespace" value="True" />
<property name="OutputTarget" value="HtmlHelp" />
<property name="HeaderHtml" value="" />
<property name="FooterHtml" value="" />
<property name="FilesToInclude" value="" />
<property name="LinkToSdkDocVersion" value="SDK_v1_1" />
<property name="ShowMissingSummaries" value="True" />
<property name="ShowMissingRemarks" value="False" />
<property name="ShowMissingParams" value="False" />
<property name="ShowMissingReturns" value="False" />
<property name="ShowMissingValues" value="False" />
<property name="DocumentInternals" value="False" />
<property name="DocumentProtected" value="True" />
<property name="DocumentPrivates" value="False" />
<property name="DocumentProtectedInternalAsProtected" value="False" />
<property name="DocumentEmptyNamespaces" value="False" />
<property name="IncludeAssemblyVersion" value="True" />
<property name="CopyrightText" value="" />
<property name="CopyrightHref" value="" />
<property name="ReferencesPath" value="" />
<property name="SkipNamespacesWithoutSummaries" value="False" />
<property name="UseNamespaceDocSummaries" value="False" />
<property name="AutoPropertyBackerSummaries" value="False" />
<property name="AutoDocumentConstructors" value="True" />
<property name="DocumentAttributes" value="True" />
<property name="ShowTypeIdInAttributes" value="False" />
<property name="DocumentedAttributes" value="True" />
<property name="GetExternalSummaries" value="True" />
<property name="EditorBrowsableFilter" value="Off" />
<property name="UseNDocXmlFile" value="" />
</documenter>
</documenters>
</ndoc>
<delete>
<!-- remove all of the html, gif, etc... files and leave only the chm -->
<fileset basedir="${build.dir}/doc/sdk">
<include name="*" />
<exclude name="*.chm" />
</fileset>
</delete>
</target>
<target name="package-source" depends="init" description="Create a Zip file for Source Releases">
<mkdir dir="${build.dir}/package" />
<copy todir="${build.dir}/package" includeemptydirs="true">
<fileset>
<include name="Cuyahoga.*" />
<include name="*.txt" />
<include name="*.xml" />
<include name="${lib.dir}/**" />
<include name="Core/**" />
<include name="ServerControls/**" />
<include name="Web/**" />
<include name="Modules/**" />
<include name="Downloads/**" />
<include name="Cuyahoga.Modules.Articles/**" />
<include name="Cuyahoga.Modules.Downloads/**" />
<include name="Cuyahoga.Modules.RemoteContent/**" />
<include name="Cuyahoga.Modules.Forum/**" />
<include name="Cuyahoga.Modules.Flash/**" />
<include name="Tests/**" />
<include name="doc/**/*.pdf" />
<include name="Database/**" /> <!-- obsolete scripts, for upgrade only -->
<exclude name="Web/Modules/**/*" />
<exclude name="Web/UserFiles/File/**/*" />
<exclude name="Web/UserFiles/Image/**/*" />
<exclude name="Web/files/**/*" />
<exclude name="Web/log/**/*" />
<exclude name="Web/index/**/*" />
<!-- exclude VS.NET stuff -->
<exclude name="**/*.suo" />
<exclude name="**/*j.user" />
<exclude name="**/bin/**" />
<exclude name="**/obj/**" />
<exclude name="**/*.resharper" />
<exclude name="**/*.resharper.user" />
</fileset>
</copy>
<property name="project.zip-path" value="build/${project::get-name()}-${project.major}.${project.minor}.${project.build}-src.zip" />
<zip zipfile="${project.zip-path}" includeemptydirs="true">
<fileset basedir="${build.dir}/package">
<include name="**/*" />
</fileset>
</zip>
<!-- delete the directory that was used to create the zip -->
<delete dir="${build.dir}/package" />
</target>
<target name="package-bin" depends="deploy" description="Create a Zip file for Binary Releases">
<copy todir="${build.dir}" includeemptydirs="true">
<fileset>
<include name="*.txt" />
<exclude name="Web/log/**/*" />
</fileset>
</copy>
<property name="project.binary-zip-path" value="build/${project::get-name()}-${project.major}.${project.minor}.${project.build}-bin.zip" />
<zip zipfile="${project.binary-zip-path}" includeemptydirs="true">
<fileset basedir="${build.dir}">
<include name="**/*" />
</fileset>
</zip>
</target>
</project>