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
@@ -1,106 +1,107 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="SVNVersioner" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<!-- DO NOT EDIT THIS FILE - This creates the assembly file to be used by the rest of the application - 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="version.
|
16
|
-
<property name="
|
17
|
-
<property name="file.custom.step.
|
18
|
-
<property name="file.custom.step.
|
19
|
-
<property name="
|
20
|
-
<property name="
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<
|
27
|
-
<call target="
|
28
|
-
<call target="
|
29
|
-
<call target="
|
30
|
-
<call target="
|
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
|
-
<setenv name="uc.app.revision
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<
|
98
|
-
<
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="SVNVersioner" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- DO NOT EDIT THIS FILE - This creates the assembly file to be used by the rest of the application - 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="git" />
|
9
|
+
<property name="path.to.toplevel" value="..${path.separator}.." />
|
10
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
11
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
12
|
+
<property name="folder.build_scripts_custom" value="build.custom${path.separator}" overwrite="false" />
|
13
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}${path.separator}versioners" />
|
14
|
+
<property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
|
15
|
+
<property name="version.revision" value="0" overwrite="false" />
|
16
|
+
<property name="version.hash" value="0" overwrite="false" />
|
17
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
|
18
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
|
19
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
|
20
|
+
<property name="is.replaced" value="false" />
|
21
|
+
<property name="fail.build.on.error" value="false" />
|
22
|
+
|
23
|
+
<target name="go" depends="run_tasks" />
|
24
|
+
|
25
|
+
<target name="run_tasks">
|
26
|
+
<echo message="Running ${project::get-name()} tasks." />
|
27
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
28
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
29
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
30
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
31
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
32
|
+
</target>
|
33
|
+
|
34
|
+
<target name="run_normal_tasks"
|
35
|
+
depends="get_revision, get_externally_provided_revision, set_version_environment_variable"
|
36
|
+
description="Generating Assembly File." />
|
37
|
+
|
38
|
+
<target name="custom_tasks_before">
|
39
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
40
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
41
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
42
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
43
|
+
</exec>
|
44
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
45
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
46
|
+
</exec>
|
47
|
+
</target>
|
48
|
+
|
49
|
+
<target name="custom_tasks_replace">
|
50
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
51
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
52
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
53
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
54
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
55
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
56
|
+
</exec>
|
57
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
58
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
59
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
60
|
+
</exec>
|
61
|
+
</target>
|
62
|
+
|
63
|
+
<target name="get_revision">
|
64
|
+
<echo message="Getting revision number from working directory ${directory::get-parent-directory(dirs.current)} or remotely at ${repository.path}."/>
|
65
|
+
<!-- try to update the revision -->
|
66
|
+
<getVersionFromGit
|
67
|
+
gitExecutableWithPath="git"
|
68
|
+
repoDirectory="."
|
69
|
+
repoPath="${repository.path}"
|
70
|
+
output="_revision.xml"
|
71
|
+
failonerror="false"
|
72
|
+
/>
|
73
|
+
<xmlpeek
|
74
|
+
file="_revision.xml"
|
75
|
+
xpath="/version/revision"
|
76
|
+
property="version.revision"
|
77
|
+
failonerror="false"/>
|
78
|
+
<xmlpeek
|
79
|
+
file="_revision.xml"
|
80
|
+
xpath="/version/hash"
|
81
|
+
property="version.hash"
|
82
|
+
failonerror="false"/>
|
83
|
+
<delete file="_revision.xml" failonerror="false" />
|
84
|
+
</target>
|
85
|
+
|
86
|
+
<target name="get_externally_provided_revision">
|
87
|
+
<property name="version.hash" value="${environment::get-variable('BUILD_VCS_NUMBER')}" if="${version.hash == '' and environment::variable-exists('BUILD_VCS_NUMBER')}" />
|
88
|
+
</target>
|
89
|
+
|
90
|
+
<target name="set_version_environment_variable">
|
91
|
+
<setenv name="uc.app.revision" value="${version.revision}"/>
|
92
|
+
<setenv name="uc.app.revision.hash" value="${version.hash}"/>
|
93
|
+
</target>
|
94
|
+
|
95
|
+
|
96
|
+
<target name="custom_tasks_after">
|
97
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
98
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
99
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
100
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
101
|
+
</exec>
|
102
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
103
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
104
|
+
</exec>
|
105
|
+
</target>
|
106
|
+
|
106
107
|
</project>
|
@@ -1,106 +1,107 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="SVNVersioner" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<!-- DO NOT EDIT THIS FILE - This creates the assembly file to be used by the rest of the application - 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="version.
|
16
|
-
<property name="
|
17
|
-
<property name="file.custom.step.
|
18
|
-
<property name="file.custom.step.
|
19
|
-
<property name="
|
20
|
-
<property name="
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<
|
27
|
-
<call target="
|
28
|
-
<call target="
|
29
|
-
<call target="
|
30
|
-
<call target="
|
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
|
-
<setenv name="uc.app.revision
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
<
|
98
|
-
<
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="SVNVersioner" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- DO NOT EDIT THIS FILE - This creates the assembly file to be used by the rest of the application - 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="hg" />
|
9
|
+
<property name="path.to.toplevel" value="..${path.separator}.." />
|
10
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
11
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
12
|
+
<property name="folder.build_scripts_custom" value="build.custom${path.separator}" overwrite="false" />
|
13
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}${path.separator}versioners" />
|
14
|
+
<property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
|
15
|
+
<property name="version.revision" value="0" overwrite="false" />
|
16
|
+
<property name="version.hash" value="0" overwrite="false" />
|
17
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
|
18
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
|
19
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
|
20
|
+
<property name="is.replaced" value="false" />
|
21
|
+
<property name="fail.build.on.error" value="false" />
|
22
|
+
|
23
|
+
<target name="go" depends="run_tasks" />
|
24
|
+
|
25
|
+
<target name="run_tasks">
|
26
|
+
<echo message="Running ${project::get-name()} tasks." />
|
27
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
28
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
29
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
30
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
31
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
32
|
+
</target>
|
33
|
+
|
34
|
+
<target name="run_normal_tasks"
|
35
|
+
depends="get_revision, get_externally_provided_revision, set_version_environment_variable"
|
36
|
+
description="Generating Assembly File." />
|
37
|
+
|
38
|
+
<target name="custom_tasks_before">
|
39
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
40
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
41
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
42
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
43
|
+
</exec>
|
44
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
45
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
46
|
+
</exec>
|
47
|
+
</target>
|
48
|
+
|
49
|
+
<target name="custom_tasks_replace">
|
50
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
51
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
52
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
53
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
54
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
55
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
56
|
+
</exec>
|
57
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
58
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
59
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
60
|
+
</exec>
|
61
|
+
</target>
|
62
|
+
|
63
|
+
<target name="get_revision">
|
64
|
+
<echo message="Getting revision number from working directory ${directory::get-parent-directory(dirs.current)} or remotely at ${repository.path}."/>
|
65
|
+
<!-- try to update the revision -->
|
66
|
+
<getVersionFromMercurial
|
67
|
+
hgExecutableWithPath="hg"
|
68
|
+
repoDirectory="."
|
69
|
+
repoPath="${repository.path}"
|
70
|
+
output="_revision.xml"
|
71
|
+
failonerror="false"
|
72
|
+
/>
|
73
|
+
<xmlpeek
|
74
|
+
file="_revision.xml"
|
75
|
+
xpath="/version/revision"
|
76
|
+
property="version.revision"
|
77
|
+
failonerror="false"/>
|
78
|
+
<xmlpeek
|
79
|
+
file="_revision.xml"
|
80
|
+
xpath="/version/hash"
|
81
|
+
property="version.hash"
|
82
|
+
failonerror="false"/>
|
83
|
+
<delete file="_revision.xml" failonerror="false" />
|
84
|
+
</target>
|
85
|
+
|
86
|
+
<target name="get_externally_provided_revision">
|
87
|
+
<property name="version.hash" value="${environment::get-variable('BUILD_VCS_NUMBER')}" if="${version.hash == '' and environment::variable-exists('BUILD_VCS_NUMBER')}" />
|
88
|
+
</target>
|
89
|
+
|
90
|
+
<target name="set_version_environment_variable">
|
91
|
+
<setenv name="uc.app.revision" value="${version.revision}"/>
|
92
|
+
<setenv name="uc.app.revision.hash" value="${version.hash}"/>
|
93
|
+
</target>
|
94
|
+
|
95
|
+
|
96
|
+
<target name="custom_tasks_after">
|
97
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
98
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
99
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
100
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
101
|
+
</exec>
|
102
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
103
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
104
|
+
</exec>
|
105
|
+
</target>
|
106
|
+
|
106
107
|
</project>
|
@@ -1,112 +1,113 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="SVNVersioner" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<!-- DO NOT EDIT THIS FILE - This creates the assembly file to be used by the rest of the application - 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="file.custom.step.
|
17
|
-
<property name="file.custom.step.
|
18
|
-
<property name="
|
19
|
-
<property name="
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<
|
26
|
-
<call target="
|
27
|
-
<call target="
|
28
|
-
<call target="
|
29
|
-
<call target="
|
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
|
-
<setenv name="uc.app.revision
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<
|
104
|
-
<
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="SVNVersioner" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- DO NOT EDIT THIS FILE - This creates the assembly file to be used by the rest of the application - 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="svn" />
|
9
|
+
<property name="path.to.toplevel" value="..${path.separator}.." />
|
10
|
+
<property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
|
11
|
+
<property name="folder.build_scripts" value="build" overwrite="false" />
|
12
|
+
<property name="folder.build_scripts_custom" value="build.custom${path.separator}" overwrite="false" />
|
13
|
+
<property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}${path.separator}versioners" />
|
14
|
+
<property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
|
15
|
+
<property name="version.revision" value="0" overwrite="false" />
|
16
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
|
17
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
|
18
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
|
19
|
+
<property name="is.replaced" value="false" />
|
20
|
+
<property name="fail.build.on.error" value="false" />
|
21
|
+
|
22
|
+
<target name="go" depends="run_tasks" />
|
23
|
+
|
24
|
+
<target name="run_tasks">
|
25
|
+
<echo message="Running ${project::get-name()} tasks." />
|
26
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
27
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
28
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
29
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
30
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
31
|
+
</target>
|
32
|
+
|
33
|
+
<target name="run_normal_tasks"
|
34
|
+
depends="get_revision, get_externally_provided_revision, set_version_environment_variable"
|
35
|
+
description="Generating Assembly File." />
|
36
|
+
|
37
|
+
<target name="custom_tasks_before">
|
38
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
39
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
40
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
41
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
42
|
+
</exec>
|
43
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
44
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
45
|
+
</exec>
|
46
|
+
</target>
|
47
|
+
|
48
|
+
<target name="custom_tasks_replace">
|
49
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
50
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
51
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
52
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
53
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
54
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
55
|
+
</exec>
|
56
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
57
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
58
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
59
|
+
</exec>
|
60
|
+
</target>
|
61
|
+
|
62
|
+
<target name="get_revision">
|
63
|
+
<echo message="Getting revision number from working directory ${directory::get-parent-directory(dirs.current)} or remotely at ${repository.path}."/>
|
64
|
+
<!-- try to update the revision -->
|
65
|
+
<exec
|
66
|
+
program="svn"
|
67
|
+
commandline="info ${dirs.current}${path.separator}${path.to.toplevel}${path.separator} --xml"
|
68
|
+
output="_revision.xml"
|
69
|
+
failonerror="false"/>
|
70
|
+
<xmlpeek
|
71
|
+
file="_revision.xml"
|
72
|
+
xpath="/info/entry/commit/@revision"
|
73
|
+
property="version.revision"
|
74
|
+
failonerror="false"/>
|
75
|
+
<exec
|
76
|
+
program="svn"
|
77
|
+
commandline="info ${repository.path} --xml"
|
78
|
+
output="_revision.xml"
|
79
|
+
failonerror="false"
|
80
|
+
if="${version.revision == '0'}"
|
81
|
+
/>
|
82
|
+
<xmlpeek
|
83
|
+
file="_revision.xml"
|
84
|
+
xpath="/info/entry/@revision"
|
85
|
+
property="version.revision"
|
86
|
+
failonerror="false"
|
87
|
+
if="${version.revision == '0'}"
|
88
|
+
/>
|
89
|
+
<delete file="_revision.xml" failonerror="false" />
|
90
|
+
</target>
|
91
|
+
|
92
|
+
<target name="get_externally_provided_revision">
|
93
|
+
<property name="version.revision" value="${environment::get-variable('BUILD_VCS_NUMBER')}" if="${version.revision == '0' and environment::variable-exists('BUILD_VCS_NUMBER')}" />
|
94
|
+
</target>
|
95
|
+
|
96
|
+
<target name="set_version_environment_variable">
|
97
|
+
<setenv name="uc.app.revision" value="${version.revision}"/>
|
98
|
+
<setenv name="uc.app.revision.hash" value="${version.revision}"/>
|
99
|
+
</target>
|
100
|
+
|
101
|
+
|
102
|
+
<target name="custom_tasks_after">
|
103
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
104
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
105
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
106
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
107
|
+
</exec>
|
108
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
109
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
110
|
+
</exec>
|
111
|
+
</target>
|
112
|
+
|
112
113
|
</project>
|