uppercutbuild 0.9.0.346.20100805 → 1.0.0.0.20100806
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/docs/README +7 -2
- data/lib/build.sh +23 -0
- data/lib/build/UppercuT.xml +1 -1
- data/lib/build/analyze.step +78 -77
- data/lib/build/analyzers/gallio.test.step +25 -26
- data/lib/build/analyzers/mbunit2.test.step +25 -28
- data/lib/build/analyzers/moma.step +29 -31
- data/lib/build/analyzers/ncover.step +32 -34
- data/lib/build/analyzers/ndepend.step +19 -12
- data/lib/build/analyzers/nitriq.step +19 -22
- data/lib/build/analyzers/nunit.test.step +37 -37
- data/lib/build/analyzers/test.step +99 -98
- data/lib/build/compile.step +68 -50
- data/lib/build/customize.build +76 -75
- data/lib/build/customizers/item.template +50 -49
- data/lib/build/default.build +171 -167
- data/lib/build/deploymentBuilder.step +103 -102
- data/lib/build/environmentBuilder.step +119 -118
- data/lib/build/gemsBuild.step +113 -112
- data/lib/build/gemsPrepare.step +157 -156
- data/lib/build/generateBuildInfo.step +108 -105
- data/lib/build/ilmerge.build +183 -182
- data/lib/build/open.build +115 -102
- data/lib/build/package.step +234 -233
- data/lib/build/policyChecks.step +81 -80
- data/lib/build/updateAssemblies.build +107 -106
- data/lib/build/uppercut.dll +0 -0
- data/lib/build/uppercut.tasks.dll +0 -0
- data/lib/build/versionBuilder.step +149 -147
- data/lib/build/versioners/git.step +106 -105
- data/lib/build/versioners/hg.step +106 -105
- data/lib/build/versioners/svn.step +112 -111
- data/lib/build/versioners/tfs.step +104 -103
- data/lib/build/zip.build +134 -162
- data/lib/deployment/scripts/database.deploy +37 -36
- data/lib/open.sh +7 -0
- data/lib/settings/UppercuT.config +76 -73
- data/lib/zip.sh +9 -0
- metadata +9 -6
data/lib/build/compile.step
CHANGED
@@ -4,18 +4,19 @@
|
|
4
4
|
<!-- 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 -->
|
5
5
|
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
6
|
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
+
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
|
7
8
|
<property name="file.current.no_extension" value="compile" />
|
8
9
|
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
9
10
|
<property name="path.to.toplevel" value=".." />
|
10
11
|
<property name="folder.build_scripts" value="build" overwrite="false" />
|
11
12
|
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
|
12
|
-
<property name="dirs.build_scripts_custom" value="${dirs.current}
|
13
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}" />
|
13
14
|
<property name="folder.code_build" value="build_output" overwrite="false" />
|
14
|
-
<property name="dirs.build" value="${dirs.current}
|
15
|
+
<property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
|
15
16
|
<property name="folder.documentation" value="docs" overwrite="false" />
|
16
|
-
<property name="dirs.docs" value="${dirs.current}
|
17
|
+
<property name="dirs.docs" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.documentation}" />
|
17
18
|
<property name="folder.database" value="__DATABASE_FOLDER_NAME__" overwrite="false" />
|
18
|
-
<property name="dirs.db" value="${dirs.current}
|
19
|
+
<property name="dirs.db" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.database}" />
|
19
20
|
<property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
|
20
21
|
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
|
21
22
|
<property name="path_to_solution" value="." overwrite="false" />
|
@@ -23,15 +24,17 @@
|
|
23
24
|
<property name="msbuild.configuration" value="Release" overwrite="false" />
|
24
25
|
<property name="msbuild.platform" value="Any CPU" overwrite="false" />
|
25
26
|
<property name="msbuild.override_output_path" value="true" overwrite="false" />
|
26
|
-
<property name="msbuild.outputpath" value="${dirs.build}
|
27
|
-
<property name="
|
28
|
-
<property name="solution.path" value="${dirs.current}
|
29
|
-
<property name="
|
27
|
+
<property name="msbuild.outputpath" value="${dirs.build}${path.separator}${folder.app.drop}" overwrite="false" />
|
28
|
+
<property name="xbuild.outputpath" value=".${path.separator}${folder.code_build}${path.separator}${folder.app.drop}" overwrite="false" />
|
29
|
+
<property name="solution.path" value="${directory::get-parent-directory(dirs.current)}${path.separator}${project.name}.sln" />
|
30
|
+
<property name="solution.path" value="${directory::get-parent-directory(dirs.current)}${path.separator}${project.name}.vbp" if="${microsoft.framework =='vb6'}" />
|
31
|
+
<property name="nant.settings.currentframework" value="mono-1.0" if="${platform::is-unix()}" />
|
32
|
+
<property name="nant.settings.currentframework" value="net-3.5" if="${microsoft.framework !='vb6' and platform::is-windows()}" />
|
30
33
|
<property name="framework.multitargeting" value="false" />
|
31
34
|
<property name="framework.multitargeting.delimiter" value="," />
|
32
|
-
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}
|
33
|
-
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}
|
34
|
-
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}
|
35
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
|
36
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
|
37
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
|
35
38
|
<property name="is.replaced" value="false" />
|
36
39
|
<property name="fail.build.on.error" value="true" />
|
37
40
|
|
@@ -77,7 +80,7 @@
|
|
77
80
|
</target>
|
78
81
|
|
79
82
|
<target name="error_check">
|
80
|
-
<fail message="You must fill out the project.name, repository.path, and company.name settings in the settings
|
83
|
+
<fail message="You must fill out the project.name, repository.path, and company.name settings in the settings${path.separator}UppercuT.config file. Please do that and retry the build."
|
81
84
|
if="${project.name=='__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__'}" />
|
82
85
|
</target>
|
83
86
|
|
@@ -103,7 +106,8 @@
|
|
103
106
|
<target name="build_dotNET_code" >
|
104
107
|
<if test="${framework.multitargeting}">
|
105
108
|
<foreach item="String" in="${microsoft.framework}" delim="${framework.multitargeting.delimiter}" property="framework.specific">
|
106
|
-
<property name="msbuild.outputpath" value="${dirs.build}
|
109
|
+
<property name="msbuild.outputpath" value="${dirs.build}${path.separator}${folder.app.drop}${path.separator}${framework.specific}" />
|
110
|
+
<property name="xbuild.outputpath" value=".${path.separator}${folder.code_build}${path.separator}${folder.app.drop}${path.separator}${framework.specific}" />
|
107
111
|
<property name="microsoft.framework.specific" value="${string::trim(framework.specific)}" />
|
108
112
|
<call target="build_dotNet_code_framework" />
|
109
113
|
</foreach>
|
@@ -117,52 +121,66 @@
|
|
117
121
|
<target name="build_dotNet_code_framework">
|
118
122
|
<echo message="Building on ${framework::get-version(microsoft.framework.specific)}" />
|
119
123
|
<property name="nant.settings.currentframework" value="${string::trim(microsoft.framework.specific)}" />
|
120
|
-
|
121
|
-
<if test="${
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
<property name="Configuration" value="${msbuild.configuration}" />
|
134
|
-
<property name="OutputPath" value="${msbuild.outputpath}" />
|
135
|
-
<property name="Platform" value="${msbuild.platform}" />
|
136
|
-
<property name="TargetFrameworkVersion" value="v${framework::get-version(microsoft.framework.specific)}" />
|
137
|
-
</msbuild>
|
138
|
-
</if>
|
124
|
+
<mkdir dir="${msbuild.outputpath}" />
|
125
|
+
<if test="${platform::is-unix()}">
|
126
|
+
<!-- Do clean and build in two steps since xbuild has a bug with using OutputPath and Rebuild together Bug #628525 at Novell -->
|
127
|
+
<echo message="Cleaning build..." />
|
128
|
+
<exec program="xbuild"
|
129
|
+
basedir="/usr/bin"
|
130
|
+
workingdir="${dirs.build}"
|
131
|
+
commandline="${solution.path} /nologo /property:OutputPath='${msbuild.outputpath}' /property:Configuration=${msbuild.configuration} /verbosity:minimal /noconsolelogger /target:Clean" />
|
132
|
+
<echo message="Building..." />
|
133
|
+
<exec program="xbuild"
|
134
|
+
basedir="/usr/bin"
|
135
|
+
workingdir="${dirs.build}"
|
136
|
+
commandline="${solution.path} /nologo /property:OutputPath='${msbuild.outputpath}' /property:Configuration=${msbuild.configuration} /verbosity:minimal /noconsolelogger" />
|
139
137
|
</if>
|
140
|
-
<if test="${
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<
|
145
|
-
|
146
|
-
|
138
|
+
<if test="${platform::is-windows()}">
|
139
|
+
<!-- nant is retarded - I had to have four of these instead of throwing an if on the outputpath and targets -->
|
140
|
+
<if test="${msbuild.override_output_path}">
|
141
|
+
<if test="${framework.multitargeting}">
|
142
|
+
<msbuild project="${solution.path}" verbosity="minimal">
|
143
|
+
<property name="Configuration" value="${msbuild.configuration}" />
|
144
|
+
<property name="OutputPath" value="${msbuild.outputpath}" />
|
145
|
+
<property name="Platform" value="${msbuild.platform}" />
|
146
|
+
<property name="TargetFrameworkVersion" value="v${framework::get-version(microsoft.framework.specific)}" />
|
147
|
+
<property name="ToolsVersion" value="${framework::get-version(microsoft.framework.specific)}" />
|
147
148
|
</msbuild>
|
149
|
+
</if>
|
150
|
+
<if test="${not framework.multitargeting}">
|
151
|
+
<msbuild project="${solution.path}" verbosity="minimal">
|
152
|
+
<property name="Configuration" value="${msbuild.configuration}" />
|
153
|
+
<property name="OutputPath" value="${msbuild.outputpath}" />
|
154
|
+
<property name="Platform" value="${msbuild.platform}" />
|
155
|
+
</msbuild>
|
156
|
+
</if>
|
148
157
|
</if>
|
149
|
-
<if test="${not
|
150
|
-
<
|
151
|
-
<
|
152
|
-
|
153
|
-
|
154
|
-
|
158
|
+
<if test="${not msbuild.override_output_path}">
|
159
|
+
<if test="${framework.multitargeting}">
|
160
|
+
<msbuild project="${solution.path}" verbosity="minimal">
|
161
|
+
<property name="Configuration" value="${msbuild.configuration}" />
|
162
|
+
<property name="Platform" value="${msbuild.platform}" />
|
163
|
+
<property name="TargetFrameworkVersion" value="v${framework::get-version(microsoft.framework.specific)}" />
|
164
|
+
<property name="ToolsVersion" value="${framework::get-version(microsoft.framework.specific)}" />
|
165
|
+
</msbuild>
|
166
|
+
</if>
|
167
|
+
<if test="${not framework.multitargeting}">
|
155
168
|
</if>
|
169
|
+
<msbuild project="${solution.path}" verbosity="minimal">
|
170
|
+
<property name="Configuration" value="${msbuild.configuration}" />
|
171
|
+
<property name="Platform" value="${msbuild.platform}" />
|
172
|
+
</msbuild>
|
173
|
+
</if>
|
156
174
|
</if>
|
157
175
|
</target>
|
158
176
|
|
159
177
|
<target name="build_vb6_code">
|
160
|
-
<vb6 project="${solution.path}" outdir="${dirs.build}
|
178
|
+
<vb6 project="${solution.path}" outdir="${dirs.build}${path.separator}${folder.app.drop}" />
|
161
179
|
</target>
|
162
180
|
|
163
181
|
<target name="copy_documentation">
|
164
|
-
<echo message="Building documentation files to ${dirs.build}
|
165
|
-
<copy todir="${dirs.build}
|
182
|
+
<echo message="Building documentation files to ${dirs.build}${path.separator}${folder.documentation}."/>
|
183
|
+
<copy todir="${dirs.build}${path.separator}${folder.documentation}">
|
166
184
|
<fileset basedir="${dirs.docs}">
|
167
185
|
<include name="**/*.*" />
|
168
186
|
</fileset>
|
@@ -170,8 +188,8 @@
|
|
170
188
|
</target>
|
171
189
|
|
172
190
|
<target name="copy_db">
|
173
|
-
<echo message="Building database files to ${dirs.build}
|
174
|
-
<copy todir="${dirs.build}
|
191
|
+
<echo message="Building database files to ${dirs.build}${path.separator}${folder.database}."/>
|
192
|
+
<copy todir="${dirs.build}${path.separator}${folder.database}">
|
175
193
|
<fileset basedir="${dirs.db}">
|
176
194
|
<include name="**/*.*" />
|
177
195
|
</fileset>
|
data/lib/build/customize.build
CHANGED
@@ -1,76 +1,77 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="Customize UppercuT" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<!-- 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 -->
|
5
|
-
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
|
-
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
-
<property name="
|
8
|
-
<property name="
|
9
|
-
<property name="
|
10
|
-
<property name="
|
11
|
-
<property name="
|
12
|
-
<property name="
|
13
|
-
<property name="customize.step.
|
14
|
-
<property name="customize.step.type
|
15
|
-
<property name="
|
16
|
-
<property name="file.
|
17
|
-
<property name="
|
18
|
-
<property name="path.to.custom_file" value=""
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
<call target="
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
<
|
43
|
-
<
|
44
|
-
<
|
45
|
-
<
|
46
|
-
<call target="
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
<property name="path.to.custom_file" value="
|
52
|
-
<
|
53
|
-
<
|
54
|
-
<
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="Customize UppercuT" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- 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 -->
|
5
|
+
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
|
+
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
+
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
|
8
|
+
<property name="file.current.no_extension" value="customize" />
|
9
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
10
|
+
<property name="path.to.toplevel" value=".." />
|
11
|
+
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
|
12
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}" />
|
13
|
+
<property name="customize.step.name" value="__REPLACE__" overwrite="false" />
|
14
|
+
<property name="customize.step.type" value="__REPLACE__" overwrite="false" />
|
15
|
+
<property name="customize.step.type.lowered" value="${string::to-lower(customize.step.type)}" />
|
16
|
+
<property name="file.customize.template" value="item.template" />
|
17
|
+
<property name="file.customized" value="" readonly="false" />
|
18
|
+
<property name="path.to.custom_file" value="-1" />
|
19
|
+
<property name="path.to.custom_file" value="" if="${file::exists(customize.step.name)}" />
|
20
|
+
|
21
|
+
<target name="go" depends="run_tasks, report_finish_time" />
|
22
|
+
|
23
|
+
<target name="run_tasks">
|
24
|
+
<echo message="Running ${project::get-name()} to create custom tasks." />
|
25
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
26
|
+
<call target="run_normal_tasks" />
|
27
|
+
</target>
|
28
|
+
|
29
|
+
<target name="run_normal_tasks"
|
30
|
+
depends="error_check, customize"
|
31
|
+
description="Setting up a customize file for UppercuT." />
|
32
|
+
|
33
|
+
<target name="error_check">
|
34
|
+
<echo message="Error checking - the input for customize.step.name is '${customize.step.name}' and the input for customize.step.type is '${customize.step.type}'." />
|
35
|
+
<fail message="Please send in the arguments for what step to customize and what type of customization. Call customize.bat /? for usage instructions."
|
36
|
+
if="${customize.step.name=='__REPLACE__' or customize.step.type =='__REPLACE__'}" />
|
37
|
+
<fail message="The type of customization can only be pre, post, or replace."
|
38
|
+
unless="${customize.step.type.lowered =='pre' or customize.step.type.lowered =='post' or customize.step.type.lowered =='replace'}" />
|
39
|
+
</target>
|
40
|
+
|
41
|
+
<target name="customize">
|
42
|
+
<property name="file.customized" value="${path::get-file-name-without-extension(customize.step.name)}.${customize.step.type.lowered}${path::get-extension(customize.step.name)}" />
|
43
|
+
<echo message="Creating a customized step called ${file.customized}." />
|
44
|
+
<call target="resolve_path_to_custom_file" />
|
45
|
+
<fail message="${file.customized} already exists in ${dirs.build_scripts_custom}. Will not run." if="${file::exists(dirs.build_scripts_custom + path.separator + file.customized)}" />
|
46
|
+
<call target="create_file_if_not_already_existing" />
|
47
|
+
<call target="replace_template_values" />
|
48
|
+
</target>
|
49
|
+
|
50
|
+
<target name="resolve_path_to_custom_file">
|
51
|
+
<property name="path.to.custom_file" value="${path.separator}analyzers" if="${file::exists('analyzers' + path.separator + customize.step.name)}" />
|
52
|
+
<property name="path.to.custom_file" value="${path.separator}versioners" if="${file::exists('versioners' + path.separator + customize.step.name)}" />
|
53
|
+
<fail message="${customize.step.name} does not exist in anywhere in the build directory." if="${path.to.custom_file=='-1'}" />
|
54
|
+
<property name="dirs.build_scripts_custom" value="${dirs.build_scripts_custom}${path.to.custom_file}" />
|
55
|
+
<echo message="Found ${customize.step.name} in '${dirs.current}${path.separator}${path.to.custom_file}'. This means the custom path is going to be ${dirs.build_scripts_custom}." />
|
56
|
+
</target>
|
57
|
+
|
58
|
+
<target name="create_file_if_not_already_existing">
|
59
|
+
<copy file="customizers${path.separator}${file.customize.template}" tofile="${dirs.build_scripts_custom}${path.separator}${file.customized}" if="${not file::exists(dirs.build_scripts_custom + path.separator + file.customized)}" />
|
60
|
+
</target>
|
61
|
+
|
62
|
+
<target name="replace_template_values">
|
63
|
+
<xmlpoke
|
64
|
+
file="${dirs.build_scripts_custom}${path.separator}${file.customized}"
|
65
|
+
xpath="/project/@name"
|
66
|
+
value="CUSTOM ${string::to-upper(customize.step.type)} ${string::to-upper(path::get-file-name-without-extension(customize.step.name))}" />
|
67
|
+
<xmlpoke
|
68
|
+
file="${dirs.build_scripts_custom}${path.separator}${file.customized}"
|
69
|
+
xpath="/project/property[@name = 'path.to.toplevel']/@value"
|
70
|
+
value="..${path.separator}.." if="${path.to.custom_file !=''}" />
|
71
|
+
</target>
|
72
|
+
|
73
|
+
<target name="report_finish_time">
|
74
|
+
<echo message="Customize finished at ${datetime::now()}. Please make any customizations you need to now to ${dirs.build_scripts_custom}${path.separator}${file.customized} and don't forget to add it to source control." />
|
75
|
+
</target>
|
76
|
+
|
76
77
|
</project>
|
@@ -1,50 +1,51 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="__REPLACE__" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
5
|
-
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
6
|
-
<property name="
|
7
|
-
<property name="
|
8
|
-
<property name="
|
9
|
-
<property name="
|
10
|
-
<property name="
|
11
|
-
<property name="
|
12
|
-
<property name="
|
13
|
-
<property name="
|
14
|
-
<property name="
|
15
|
-
<property name="
|
16
|
-
<property name="
|
17
|
-
<property name="folder.
|
18
|
-
<property name="
|
19
|
-
<property name="
|
20
|
-
<property name="
|
21
|
-
<property name="
|
22
|
-
<property name="
|
23
|
-
<property name="
|
24
|
-
<property name="
|
25
|
-
<property name="
|
26
|
-
<property name="
|
27
|
-
<property name="
|
28
|
-
<property name="
|
29
|
-
<property name="
|
30
|
-
<property name="
|
31
|
-
<property name="
|
32
|
-
<property name="
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<!--
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="__REPLACE__" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
5
|
+
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
6
|
+
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
|
7
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
8
|
+
<property name="path.to.toplevel" value=".." />
|
9
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
10
|
+
<property name="dirs.build_scripts" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts}" />
|
11
|
+
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
|
12
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}" />
|
13
|
+
<property name="folder.code_build" value="build_output" overwrite="false" />
|
14
|
+
<property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
|
15
|
+
<property name="folder.code_drop" value="code_drop" overwrite="false" />
|
16
|
+
<property name="dirs.drop" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_drop}" overwrite="false" />
|
17
|
+
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
|
18
|
+
<property name="folder.database" value="__DATABASE_FOLDER_NAME__" overwrite="false" />
|
19
|
+
<property name="dirs.database" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.database}" overwrite="false" />
|
20
|
+
<property name="folder.reports" value="${project.name}.Reports" overwrite="false" />
|
21
|
+
<property name="dirs.reports" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.reports}" overwrite="false" />
|
22
|
+
<property name="folder.file_server" value="file.server" overwrite="false" />
|
23
|
+
<property name="dirs.file_server" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.file_server}" overwrite="false" />
|
24
|
+
<property name="folder.environment_files" value="environment.files" overwrite="false" />
|
25
|
+
<property name="dirs.environment_files" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.environment_files}" overwrite="false" />
|
26
|
+
<property name="folder.deployment" value="deployment" overwrite="false" />
|
27
|
+
<property name="dirs.deployment" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.deployment}" overwrite="false" />
|
28
|
+
<property name="folder.settings" value="settings" overwrite="false" />
|
29
|
+
<property name="dirs.settings" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.settings}" overwrite="false" />
|
30
|
+
<property name="folder.documentation" value="docs" overwrite="false" />
|
31
|
+
<property name="dirs.docs" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.documentation}" overwrite="false" />
|
32
|
+
<property name="folder.references" value="lib" overwrite="false" />
|
33
|
+
<property name="dirs.lib" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.references}" overwrite="false" />
|
34
|
+
|
35
|
+
<target name="go" depends="run_tasks" />
|
36
|
+
|
37
|
+
<target name="run_tasks">
|
38
|
+
<!-- INSERT YOUR TASKS HERE OR CALL OUT TO OTHER TASKS -->
|
39
|
+
<!-- Sample provided below that you can customize -->
|
40
|
+
</target>
|
41
|
+
|
42
|
+
<!--<target name="documentation">
|
43
|
+
<echo message="Packaging documentation files to ${dirs.drop}${path.separator}${folder.documentation}."/>
|
44
|
+
<copy todir="${dirs.drop}${path.separator}${folder.documentation}">
|
45
|
+
<fileset basedir="${dirs.build}${path.separator}${folder.documentation}">
|
46
|
+
<include name="**/*.*" />
|
47
|
+
</fileset>
|
48
|
+
</copy>
|
49
|
+
</target>-->
|
50
|
+
|
50
51
|
</project>
|
data/lib/build/default.build
CHANGED
@@ -1,168 +1,172 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="UppercuTBuild" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<!-- 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 -->
|
5
|
-
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
|
-
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
-
<property name="
|
8
|
-
<property name="
|
9
|
-
<property name="
|
10
|
-
<property name="
|
11
|
-
<property name="folder.
|
12
|
-
<property name="
|
13
|
-
<property name="
|
14
|
-
<property name="
|
15
|
-
<property name="
|
16
|
-
<property name="
|
17
|
-
<property name="
|
18
|
-
<property name="
|
19
|
-
<property name="
|
20
|
-
<property name="
|
21
|
-
<property name="
|
22
|
-
<property name="version.
|
23
|
-
<property name="version.
|
24
|
-
<property name="version.
|
25
|
-
<property name="
|
26
|
-
<property name="
|
27
|
-
<property name="
|
28
|
-
<property name="
|
29
|
-
<property name="
|
30
|
-
<property name="
|
31
|
-
<property name="file.
|
32
|
-
<property name="
|
33
|
-
<property name="
|
34
|
-
|
35
|
-
<
|
36
|
-
|
37
|
-
<
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
<
|
43
|
-
<call target="
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<target name="
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
<
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<
|
67
|
-
|
68
|
-
|
69
|
-
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.
|
70
|
-
<exec program="
|
71
|
-
<arg value="${path::get-full-path(file.custom.step.replace + '.
|
72
|
-
</exec>
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
<
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
<
|
92
|
-
<
|
93
|
-
<
|
94
|
-
|
95
|
-
<nant buildfile="${dirs.current}
|
96
|
-
<nant buildfile="${dirs.current}
|
97
|
-
<nant buildfile="${dirs.current}
|
98
|
-
<nant buildfile="${dirs.current}
|
99
|
-
<nant buildfile="${dirs.current}
|
100
|
-
<nant buildfile="${dirs.current}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
<nant buildfile="${dirs.current}
|
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
|
-
<echo message="
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
</target>
|
143
|
-
|
144
|
-
<target name="
|
145
|
-
<
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
<
|
155
|
-
</target>
|
156
|
-
|
157
|
-
<target name="
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
<!-- powershell
|
163
|
-
<exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
|
164
|
-
<arg value="set-executionpolicy unrestricted
|
165
|
-
</exec>
|
166
|
-
|
167
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="UppercuTBuild" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- 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 -->
|
5
|
+
<property name="build.config.settings" value="__NONE__" overwrite="false" />
|
6
|
+
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
|
7
|
+
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
|
8
|
+
<property name="file.current.no_extension" value="default" />
|
9
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
10
|
+
<property name="path.to.toplevel" value=".." />
|
11
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
12
|
+
<property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
|
13
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}" />
|
14
|
+
<property name="folder.code_build" value="build_output" overwrite="false" />
|
15
|
+
<property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
|
16
|
+
<property name="folder.code_drop" value="code_drop" overwrite="false" />
|
17
|
+
<property name="dirs.drop" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_drop}" overwrite="false" />
|
18
|
+
<property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
|
19
|
+
<property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
|
20
|
+
<property name="company.name" value="__COMPANY_NAME__" overwrite="false" />
|
21
|
+
<property name="source_control_type" value="svn" overwrite="false" />
|
22
|
+
<property name="version.uppercut" value="0" />
|
23
|
+
<property name="version.major" value="0" overwrite="false" />
|
24
|
+
<property name="version.minor" value="0" overwrite="false" />
|
25
|
+
<property name="version.patch" value="0" overwrite="false" />
|
26
|
+
<property name="version.build" value="0" />
|
27
|
+
<property name="version.revision" value="0" />
|
28
|
+
<property name="version.hash" value="${version.revision}" overwrite="false" />
|
29
|
+
<property name="allow.powershell.unrestricted" value="false" overwrite="false" />
|
30
|
+
<property name="run.ilmerge" value="false" overwrite="false" />
|
31
|
+
<property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
|
32
|
+
<property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${file.uppercut.assembly}" />
|
33
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.build" />
|
34
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.build" />
|
35
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.build" />
|
36
|
+
<property name="is.replaced" value="false" />
|
37
|
+
<property name="fail.build.on.error" value="true" />
|
38
|
+
|
39
|
+
<target name="go" depends="load_uppercut_assemblies, allow_powershell_unrestricted, report_uppercut_version, run_tasks, report_finish_time" />
|
40
|
+
|
41
|
+
<target name="run_tasks">
|
42
|
+
<echo message="Running ${project::get-name()} tasks." />
|
43
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
44
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
45
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
46
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
47
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
48
|
+
</target>
|
49
|
+
|
50
|
+
<target name="run_normal_tasks"
|
51
|
+
depends="error_check, build"
|
52
|
+
description="Building with UppercuT default.build." />
|
53
|
+
|
54
|
+
<target name="custom_tasks_before">
|
55
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
56
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
57
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
58
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
59
|
+
</exec>
|
60
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
61
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
62
|
+
</exec>
|
63
|
+
</target>
|
64
|
+
|
65
|
+
<target name="custom_tasks_replace">
|
66
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
67
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
68
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
69
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
70
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
71
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
72
|
+
</exec>
|
73
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
74
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
75
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
76
|
+
</exec>
|
77
|
+
</target>
|
78
|
+
|
79
|
+
<target name="prepare">
|
80
|
+
<echo message="Removing and adding ${dirs.build}."/>
|
81
|
+
<delete dir="${dirs.build}" failonerror="false" />
|
82
|
+
<mkdir dir="${dirs.build}" failonerror="false" />
|
83
|
+
</target>
|
84
|
+
|
85
|
+
<target name="error_check">
|
86
|
+
<fail message="You must fill out the project.name, repository.path, and company.name settings in the settings${path.separator}UppercuT.config file. Please do that and retry the build."
|
87
|
+
if="${project.name=='__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__' or repository.path=='__REPOSITORY_PATH__' or company.name=='__COMPANY_NAME__'}" />
|
88
|
+
</target>
|
89
|
+
|
90
|
+
<target name="build">
|
91
|
+
<call target="get_revision" />
|
92
|
+
<call target="get_build_number" />
|
93
|
+
<call target="get_drop_directory" />
|
94
|
+
|
95
|
+
<nant buildfile="${dirs.current}${path.separator}policyChecks.step" inheritall="true" />
|
96
|
+
<nant buildfile="${dirs.current}${path.separator}versionBuilder.step" inheritall="true" />
|
97
|
+
<nant buildfile="${dirs.current}${path.separator}generateBuildInfo.step" inheritall="true" />
|
98
|
+
<nant buildfile="${dirs.current}${path.separator}compile.step" inheritall="true" />
|
99
|
+
<nant buildfile="${dirs.current}${path.separator}environmentBuilder.step" inheritall="true" />
|
100
|
+
<nant buildfile="${dirs.current}${path.separator}analyze.step" inheritall="true" />
|
101
|
+
<nant buildfile="${dirs.current}${path.separator}package.step" inheritall="true" />
|
102
|
+
<nant buildfile="${dirs.current}${path.separator}ilmerge.build" inheritall="true" if="${run.ilmerge}" />
|
103
|
+
<nant buildfile="${dirs.current}${path.separator}gemsPrepare.step" inheritall="true" />
|
104
|
+
<nant buildfile="${dirs.current}${path.separator}gemsBuild.step" inheritall="true" />
|
105
|
+
</target>
|
106
|
+
|
107
|
+
<target name="get_revision">
|
108
|
+
<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}svn.step" inheritall="true" if="${source_control_type=='svn'}" failonerror="false" />
|
109
|
+
<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}tfs.step" inheritall="true" if="${source_control_type=='tfs'}" failonerror="false" />
|
110
|
+
<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}git.step" inheritall="true" if="${source_control_type=='git'}" failonerror="false" />
|
111
|
+
<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}hg.step" inheritall="true" if="${source_control_type=='hg'}" failonerror="false" />
|
112
|
+
<!--<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}vault.step" inheritall="true" if="${source_control_type=='vault'}" />-->
|
113
|
+
<!--<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}vss.step" inheritall="true" if="${source_control_type=='vss'}" />-->
|
114
|
+
|
115
|
+
<property name="version.revision" value="${environment::get-variable('uc.app.revision')}" if="${environment::variable-exists('uc.app.revision')}" />
|
116
|
+
<property name="version.hash" value="${environment::get-variable('uc.app.revision.hash')}" if="${environment::variable-exists('uc.app.revision.hash')}" />
|
117
|
+
<property name="version.hash" value="${version.revision}" if="${version.hash == '0'}" />
|
118
|
+
<echo message="Using revision number: ${version.revision} and hash: ${version.hash}." />
|
119
|
+
</target>
|
120
|
+
|
121
|
+
<target name="get_build_number">
|
122
|
+
<property name="version.build" value="${environment::get-variable('CCNetNumericLabel')}" if="${environment::variable-exists('CCNetNumericLabel')}" />
|
123
|
+
<property name="version.build" value="${environment::get-variable('BUILD_NUMBER')}" if="${environment::variable-exists('BUILD_NUMBER')}" />
|
124
|
+
<echo message="Using build number ${version.build}." />
|
125
|
+
</target>
|
126
|
+
|
127
|
+
<target name="get_drop_directory">
|
128
|
+
<property name="dirs.drop" value="${environment::get-variable('CCNetArtifactDirectory')}${path.separator}b${version.build}-r${version.revision}" if="${environment::variable-exists('CCNetArtifactDirectory')}" />
|
129
|
+
<!--Point TeamCity at code_drop for an artifact directory. It will automatically save the files. -->
|
130
|
+
<echo message="Compiled code drop directory will be ${path::get-full-path(dirs.drop)}." />
|
131
|
+
</target>
|
132
|
+
|
133
|
+
<target name="custom_tasks_after">
|
134
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
135
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
136
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
137
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
138
|
+
</exec>
|
139
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
140
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
141
|
+
</exec>
|
142
|
+
</target>
|
143
|
+
|
144
|
+
<target name="report_finish_time">
|
145
|
+
<echo message="Build finished at ${datetime::now()} with UppercuT version ${version.uppercut}." />
|
146
|
+
</target>
|
147
|
+
|
148
|
+
<target name="report_uppercut_version">
|
149
|
+
<xmlpeek
|
150
|
+
file="UppercuT.xml"
|
151
|
+
xpath="/uppercut/version"
|
152
|
+
property="version.uppercut"
|
153
|
+
failonerror="false" />
|
154
|
+
<echo message="Using UppercuT version: ${version.uppercut}." />
|
155
|
+
</target>
|
156
|
+
|
157
|
+
<target name="load_uppercut_assemblies">
|
158
|
+
<loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
|
159
|
+
</target>
|
160
|
+
|
161
|
+
<target name="allow_powershell_unrestricted">
|
162
|
+
<!-- powershell 1.0 -->
|
163
|
+
<exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
|
164
|
+
<arg value="set-executionpolicy unrestricted" />
|
165
|
+
</exec>
|
166
|
+
<!-- powershell 2.0 -->
|
167
|
+
<exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
|
168
|
+
<arg value="set-executionpolicy unrestricted -force -scope CurrentUser" />
|
169
|
+
</exec>
|
170
|
+
</target>
|
171
|
+
|
168
172
|
</project>
|