forked from phatboyg/Magnum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.step
237 lines (213 loc) · 12.2 KB
/
package.step
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
<?xml version="1.0" encoding="utf-8" ?>
<project name="PackageBuilder" default="go">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- DO NOT EDIT THIS FILE - Add custom tasks in BuildTasks.Custom folder with file by the same name - find out more at http://uppercut.pbwiki.com -->
<property name="build.config.settings" value="__NONE__" overwrite="false" />
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
<property name="file.current.no_extension" value="package" />
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
<property name="path.to.toplevel" value=".." />
<property name="folder.build_scripts" value="build" overwrite="false" />
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}" />
<property name="folder.code_build" value="build_output" overwrite="false" />
<property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
<property name="folder.code_drop" value="code_drop" overwrite="false" />
<property name="dirs.drop" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_drop}" overwrite="false" />
<property name="folder.build_artifacts" value="build_artifacts" overwrite="false" />
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
<property name="folder.database" value="__DATABASE_FOLDER_NAME__" overwrite="false" />
<property name="folder.reports" value="${project.name}.Reports" overwrite="false" />
<property name="folder.file_server" value="file.server" overwrite="false" />
<property name="folder.environment_files" value="environment.files" overwrite="false" />
<property name="folder.deployment" value="deployment" overwrite="false" />
<property name="folder.settings" value="settings" overwrite="false" />
<property name="folder.documentation" value="docs" overwrite="false" />
<property name="file.build_info" value="${dirs.build}${path.separator}_BuildInfo.xml" />
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
<property name="is.replaced" value="false" />
<property name="fail.build.on.error" value="true" />
<target name="go" depends="run_tasks" />
<target name="run_tasks">
<echo message="Running ${project::get-name()} tasks." />
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
<call target="run_normal_tasks" if="${not is.replaced}" />
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
</target>
<target name="run_normal_tasks"
depends="prepare, build_artifacts, app, web, db, reports, file_server, environment_files, deployment_scripts, settings_files, build_deployment_files, build_info_file, documentation"
description="Packaging project." />
<target name="prepare">
<echo message="Removing and adding ${dirs.drop}."/>
<delete dir="${dirs.drop}" failonerror="false" />
<mkdir dir="${dirs.drop}" />
</target>
<target name="custom_tasks_before">
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
</exec>
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
</exec>
</target>
<target name="custom_tasks_replace">
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
</exec>
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
</exec>
</target>
<target name="build_artifacts">
<echo message="Packaging build artifacts (such as test results) to ${dirs.drop}${path.separator}${folder.build_artifacts}."/>
<copy todir="${dirs.drop}${path.separator}${folder.build_artifacts}">
<fileset basedir="${dirs.build}${path.separator}${folder.build_artifacts}">
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="app">
<echo message="Packaging application items to ${dirs.drop}${path.separator}${folder.app.drop}."/>
<copy todir="${dirs.drop}${path.separator}${folder.app.drop}">
<fileset basedir="${dirs.build}${path.separator}${folder.app.drop}">
<exclude name="${folder.database}${path.separator}**" />
<exclude name="${folder.reports}${path.separator}**" />
<exclude name="${folder.deployment}${path.separator}**" />
<exclude name="${folder.documentation}${path.separator}**" />
<exclude name="${folder.environment_files}${path.separator}**" />
<exclude name="${folder.file_server}${path.separator}**" />
<exclude name="${folder.build_artifacts}${path.separator}**" />
<exclude name="*_Published*${path.separator}**" />
<exclude name="*Test*${path.separator}**" />
<exclude name="*.Specs*${path.separator}**" />
<exclude name="*bdddoc.*" />
<exclude name="*developwithpassion.bdd.*" />
<exclude name="*nunit.*" />
<exclude name="*xunit.*" />
<exclude name="*MbUnit*.*" />
<exclude name="*Refly.*" />
<exclude name="*QuickGraph*.*" />
<exclude name="*Rhino.Mocks.*" />
<exclude name="*Moq.*" />
<exclude name="**${path.separator}*.template" />
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="web">
<echo message="Packaging website to ${dirs.drop}${path.separator}_PublishedWebSites."/>
<copy todir="${dirs.drop}${path.separator}_PublishedWebSites">
<fileset basedir="${dirs.build}${path.separator}${folder.app.drop}${path.separator}_PublishedWebSites">
<exclude name="**${path.separator}*.template" />
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="db">
<echo message="Packaging database files to ${dirs.drop}${path.separator}${folder.database}."/>
<copy todir="${dirs.drop}${path.separator}${folder.database}">
<fileset basedir="${dirs.build}${path.separator}${folder.database}">
<exclude name="**${path.separator}*.template" />
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="reports">
<echo message="Packaging reports to ${dirs.drop}${path.separator}${folder.reports}."/>
<copy todir="${dirs.drop}${path.separator}${folder.reports}">
<fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.reports}">
<exclude name="**${path.separator}*.template" />
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="file_server">
<echo message="Packaging file server items to ${dirs.drop}${path.separator}${folder.file_server}."/>
<copy todir="${dirs.drop}${path.separator}${folder.file_server}">
<fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.file_server}">
<exclude name="**${path.separator}*.template" />
<include name="**/*.*" />
</fileset>
</copy>
<echo message="Packaging output fileserver items to ${dirs.drop}${path.separator}FileServer."/>
<copy todir="${dirs.drop}${path.separator}FileServer">
<fileset basedir="${dirs.build}${path.separator}${folder.app.drop}${path.separator}FileServer">
<include name="**/**" />
</fileset>
</copy>
</target>
<target name="environment_files">
<echo message="Packaging environment files to ${dirs.drop}${path.separator}${folder.environment_files}."/>
<copy todir="${dirs.drop}${path.separator}${folder.environment_files}">
<fileset basedir="${dirs.build}${path.separator}${folder.environment_files}">
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="deployment_scripts">
<echo message="Packaging deployment scripts to ${dirs.drop}${path.separator}${folder.deployment}."/>
<copy todir="${dirs.drop}${path.separator}${folder.deployment}">
<fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.deployment}">
<exclude name="**${path.separator}*.template" />
<exclude name="templates${path.separator}**" />
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="settings_files">
<echo message="Packaging settings files to ${dirs.drop}${path.separator}${folder.settings}."/>
<copy todir="${dirs.drop}${path.separator}${folder.settings}">
<fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.settings}">
<include name="**/*.settings" />
</fileset>
</copy>
</target>
<target name="build_deployment_files">
<echo message="Building Deployment Files."/>
<nant buildfile="deploymentBuilder.step" inheritall="true" failonerror="false" />
</target>
<target name="build_info_file">
<echo message="Copying ${file.build_info} to ${folder.build_artifacts}, ${folder.app.drop}, and ${folder.deployment} in the ${dirs.drop} folder."/>
<copy
file="${file.build_info}"
todir="${dirs.drop}${path.separator}${folder.build_artifacts}"
/>
<copy
file="${file.build_info}"
todir="${dirs.drop}${path.separator}${folder.app.drop}"
/>
<copy
file="${file.build_info}"
todir="${dirs.drop}${path.separator}${folder.deployment}"
/>
</target>
<target name="documentation">
<echo message="Packaging documentation files to ${dirs.drop}${path.separator}${folder.documentation}."/>
<copy todir="${dirs.drop}${path.separator}${folder.documentation}">
<fileset basedir="${dirs.build}${path.separator}${folder.documentation}">
<include name="**/*.*" />
</fileset>
</copy>
</target>
<target name="custom_tasks_after">
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
</exec>
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
</exec>
</target>
</project>