forked from cuyahogaproject/cuyahoga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cuyahoga.build
219 lines (193 loc) · 8.17 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
<?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="src/Cuyahoga.Core/Cuyahoga.Core.build" />
<include name="src/Cuyahoga.ServerControls/Cuyahoga.ServerControls.build" />
<include name="src/Cuyahoga.Web.Mvc/Cuyahoga.Web.Mvc.build" />
<include name="src/Cuyahoga.Web/Cuyahoga.Web.build" />
<include name="src/Cuyahoga.Modules/Cuyahoga.Modules.build" />
<include name="src/Cuyahoga.Modules.Articles/Cuyahoga.Modules.Articles.build" />
<include name="src/Cuyahoga.Modules.Downloads/Cuyahoga.Modules.Downloads.build" />
<include name="src/Cuyahoga.Modules.RemoteContent/Cuyahoga.Modules.RemoteContent.build" />
</fileset>
<fileset id="buildfiles.test">
<include name="src/Cuyahoga.Tests/Cuyahoga.Tests.build" />
</fileset>
<fileset id="buildfiles.deploy">
<!-- Include all buildfiles here that have a deploy target -->
<include name="src/Cuyahoga.Web/Cuyahoga.Web.build" />
<include name="src/Cuyahoga.Modules/Cuyahoga.Modules.build" />
<include name="src/Cuyahoga.Modules.Articles/Cuyahoga.Modules.Articles.build" />
<include name="src/Cuyahoga.Modules.Downloads/Cuyahoga.Modules.Downloads.build" />
<include name="src/Cuyahoga.Modules.RemoteContent/Cuyahoga.Modules.RemoteContent.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>
<nant target="test" if="${common.testrunner.enabled}">
<buildfiles refid="buildfiles.test" />
</nant>
</target>
<target name="quick" description="Speed up the build by skipping tests">
<property name="common.testrunner.enabled" value="false" />
</target>
<target name="release" description="Make a release build">
<property name="project.config" value="release" />
</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}" />
<mkdir dir="${testresults.dir}" />
<call target="common.find-svninfo" />
<call target="common.find-nunit" if="${common.testrunner.enabled}" />
</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="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 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 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">
<mkdir dir="${build.web.dir}" />
<copy todir="${build.web.dir}">
<fileset>
<include name="*.txt" />
</fileset>
</copy>
<mkdir dir="${build.web.dir}/bin" />
<copy todir="${build.web.dir}/bin">
<fileset basedir="${build.bin.dir}">
<include name="**/*.dll" />
<include name="**/*.xml" />
</fileset>
</copy>
<nant target="deploy">
<buildfiles refid="buildfiles.deploy" />
</nant>
</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="tools/**/*" />
<include name="Cuyahoga.*" />
<include name="src/Cuyahoga.*" />
<include name="*.txt" />
<include name="*.xml" />
<include name="*.cmd" />
<include name="${lib.dir}/**" />
<include name="src/Cuyahoga.Core/**" />
<include name="src/Cuyahoga.ServerControls/**" />
<include name="src/Cuyahoga.Web/**" />
<include name="src/Cuyahoga.Web.Mvc/**" />
<include name="src/Cuyahoga.Modules/**" />
<include name="src/Cuyahoga.Modules.Articles/**" />
<include name="src/Cuyahoga.Modules.Downloads/**" />
<include name="src/Cuyahoga.Modules.RemoteContent/**" />
<include name="src/Cuyahoga.Tests/**" />
<include name="doc/**/*.pdf" />
<!-- exclude module output -->
<exclude name="src/Cuyahoga.Web/Modules/Articles/**" />
<exclude name="src/Cuyahoga.Web/Modules/Categories/**" />
<exclude name="src/Cuyahoga.Web/Modules/Downloads/**" />
<exclude name="src/Cuyahoga.Web/Modules/LanguageSwitcher/**" />
<exclude name="src/Cuyahoga.Web/Modules/RemoteContent/**" />
<exclude name="src/Cuyahoga.Web/Modules/Search/**" />
<exclude name="src/Cuyahoga.Web/Modules/Sitemap/**" />
<exclude name="src/Cuyahoga.Web/Modules/StaticHtml/**" />
<exclude name="src/Cuyahoga.Web/Modules/User/**" />
<!-- exclude content -->
<exclude name="src/Cuyahoga.Web/SiteData/**" />
<exclude name="src/Cuyahoga.Web/log/**" />
<!-- exclude VS.NET stuff -->
<exclude name="src/**/*.suo" />
<exclude name="src/**/*.user" />
<exclude name="src/**/bin/**" />
<exclude name="src/**/obj/**" />
</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">
<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.web.dir}">
<include name="**/*" />
</fileset>
</zip>
</target>
</project>