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.
Files changed (39) hide show
  1. data/docs/README +7 -2
  2. data/lib/build.sh +23 -0
  3. data/lib/build/UppercuT.xml +1 -1
  4. data/lib/build/analyze.step +78 -77
  5. data/lib/build/analyzers/gallio.test.step +25 -26
  6. data/lib/build/analyzers/mbunit2.test.step +25 -28
  7. data/lib/build/analyzers/moma.step +29 -31
  8. data/lib/build/analyzers/ncover.step +32 -34
  9. data/lib/build/analyzers/ndepend.step +19 -12
  10. data/lib/build/analyzers/nitriq.step +19 -22
  11. data/lib/build/analyzers/nunit.test.step +37 -37
  12. data/lib/build/analyzers/test.step +99 -98
  13. data/lib/build/compile.step +68 -50
  14. data/lib/build/customize.build +76 -75
  15. data/lib/build/customizers/item.template +50 -49
  16. data/lib/build/default.build +171 -167
  17. data/lib/build/deploymentBuilder.step +103 -102
  18. data/lib/build/environmentBuilder.step +119 -118
  19. data/lib/build/gemsBuild.step +113 -112
  20. data/lib/build/gemsPrepare.step +157 -156
  21. data/lib/build/generateBuildInfo.step +108 -105
  22. data/lib/build/ilmerge.build +183 -182
  23. data/lib/build/open.build +115 -102
  24. data/lib/build/package.step +234 -233
  25. data/lib/build/policyChecks.step +81 -80
  26. data/lib/build/updateAssemblies.build +107 -106
  27. data/lib/build/uppercut.dll +0 -0
  28. data/lib/build/uppercut.tasks.dll +0 -0
  29. data/lib/build/versionBuilder.step +149 -147
  30. data/lib/build/versioners/git.step +106 -105
  31. data/lib/build/versioners/hg.step +106 -105
  32. data/lib/build/versioners/svn.step +112 -111
  33. data/lib/build/versioners/tfs.step +104 -103
  34. data/lib/build/zip.build +134 -162
  35. data/lib/deployment/scripts/database.deploy +37 -36
  36. data/lib/open.sh +7 -0
  37. data/lib/settings/UppercuT.config +76 -73
  38. data/lib/zip.sh +9 -0
  39. 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="file.current.no_extension" value="git" />
8
- <property name="path.to.toplevel" value="..\.." />
9
- <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
10
- <property name="folder.build_scripts" value="build" overwrite="false" />
11
- <property name="folder.build_scripts_custom" value="build.custom\" overwrite="false" />
12
- <property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}\versioners" />
13
- <property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
14
- <property name="version.revision" value="0" overwrite="false" />
15
- <property name="version.hash" value="0" overwrite="false" />
16
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.step" />
17
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.step" />
18
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${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
- <getVersionFromGit
66
- gitExecutableWithPath="git"
67
- repoDirectory="."
68
- repoPath="${repository.path}"
69
- output="_revision.xml"
70
- failonerror="false"
71
- />
72
- <xmlpeek
73
- file="_revision.xml"
74
- xpath="/version/revision"
75
- property="version.revision"
76
- failonerror="false"/>
77
- <xmlpeek
78
- file="_revision.xml"
79
- xpath="/version/hash"
80
- property="version.hash"
81
- failonerror="false"/>
82
- <delete file="_revision.xml" failonerror="false" />
83
- </target>
84
-
85
- <target name="get_externally_provided_revision">
86
- <property name="version.hash" value="${environment::get-variable('BUILD_VCS_NUMBER')}" if="${version.hash == '' and environment::variable-exists('BUILD_VCS_NUMBER')}" />
87
- </target>
88
-
89
- <target name="set_version_environment_variable">
90
- <setenv name="uc.app.revision" value="${version.revision}"/>
91
- <setenv name="uc.app.revision.hash" value="${version.hash}"/>
92
- </target>
93
-
94
-
95
- <target name="custom_tasks_after">
96
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
97
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
98
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
99
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
100
- </exec>
101
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
102
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
103
- </exec>
104
- </target>
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="file.current.no_extension" value="hg" />
8
- <property name="path.to.toplevel" value="..\.." />
9
- <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
10
- <property name="folder.build_scripts" value="build" overwrite="false" />
11
- <property name="folder.build_scripts_custom" value="build.custom\" overwrite="false" />
12
- <property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}\versioners" />
13
- <property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
14
- <property name="version.revision" value="0" overwrite="false" />
15
- <property name="version.hash" value="0" overwrite="false" />
16
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.step" />
17
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.step" />
18
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${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
- <getVersionFromMercurial
66
- hgExecutableWithPath="hg"
67
- repoDirectory="."
68
- repoPath="${repository.path}"
69
- output="_revision.xml"
70
- failonerror="false"
71
- />
72
- <xmlpeek
73
- file="_revision.xml"
74
- xpath="/version/revision"
75
- property="version.revision"
76
- failonerror="false"/>
77
- <xmlpeek
78
- file="_revision.xml"
79
- xpath="/version/hash"
80
- property="version.hash"
81
- failonerror="false"/>
82
- <delete file="_revision.xml" failonerror="false" />
83
- </target>
84
-
85
- <target name="get_externally_provided_revision">
86
- <property name="version.hash" value="${environment::get-variable('BUILD_VCS_NUMBER')}" if="${version.hash == '' and environment::variable-exists('BUILD_VCS_NUMBER')}" />
87
- </target>
88
-
89
- <target name="set_version_environment_variable">
90
- <setenv name="uc.app.revision" value="${version.revision}"/>
91
- <setenv name="uc.app.revision.hash" value="${version.hash}"/>
92
- </target>
93
-
94
-
95
- <target name="custom_tasks_after">
96
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
97
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
98
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
99
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
100
- </exec>
101
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
102
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
103
- </exec>
104
- </target>
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="file.current.no_extension" value="svn" />
8
- <property name="path.to.toplevel" value="..\.." />
9
- <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
10
- <property name="folder.build_scripts" value="build" overwrite="false" />
11
- <property name="folder.build_scripts_custom" value="build.custom\" overwrite="false" />
12
- <property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}\versioners" />
13
- <property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
14
- <property name="version.revision" value="0" overwrite="false" />
15
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.step" />
16
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.step" />
17
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${file.current.no_extension}.replace.step" />
18
- <property name="is.replaced" value="false" />
19
- <property name="fail.build.on.error" value="false" />
20
-
21
- <target name="go" depends="run_tasks" />
22
-
23
- <target name="run_tasks">
24
- <echo message="Running ${project::get-name()} tasks." />
25
- <call target="prepare" if="${target::exists('prepare')}" />
26
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
27
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
28
- <call target="run_normal_tasks" if="${not is.replaced}" />
29
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
30
- </target>
31
-
32
- <target name="run_normal_tasks"
33
- depends="get_revision, get_externally_provided_revision, set_version_environment_variable"
34
- description="Generating Assembly File." />
35
-
36
- <target name="custom_tasks_before">
37
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
38
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
39
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
40
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
41
- </exec>
42
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
43
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
44
- </exec>
45
- </target>
46
-
47
- <target name="custom_tasks_replace">
48
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
49
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
50
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
51
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
52
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
53
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
54
- </exec>
55
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
56
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
57
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
58
- </exec>
59
- </target>
60
-
61
- <target name="get_revision">
62
- <echo message="Getting revision number from working directory ${directory::get-parent-directory(dirs.current)} or remotely at ${repository.path}."/>
63
- <!-- try to update the revision -->
64
- <exec
65
- program="svn"
66
- commandline="info ${dirs.current}\${path.to.toplevel}\ --xml"
67
- output="_revision.xml"
68
- failonerror="false"/>
69
- <xmlpeek
70
- file="_revision.xml"
71
- xpath="/info/entry/commit/@revision"
72
- property="version.revision"
73
- failonerror="false"/>
74
- <exec
75
- program="svn"
76
- commandline="info ${repository.path} --xml"
77
- output="_revision.xml"
78
- failonerror="false"
79
- if="${version.revision == '0'}"
80
- />
81
- <xmlpeek
82
- file="_revision.xml"
83
- xpath="/info/entry/@revision"
84
- property="version.revision"
85
- failonerror="false"
86
- if="${version.revision == '0'}"
87
- />
88
- <delete file="_revision.xml" failonerror="false" />
89
- </target>
90
-
91
- <target name="get_externally_provided_revision">
92
- <property name="version.revision" value="${environment::get-variable('BUILD_VCS_NUMBER')}" if="${version.revision == '0' and environment::variable-exists('BUILD_VCS_NUMBER')}" />
93
- </target>
94
-
95
- <target name="set_version_environment_variable">
96
- <setenv name="uc.app.revision" value="${version.revision}"/>
97
- <setenv name="uc.app.revision.hash" value="${version.revision}"/>
98
- </target>
99
-
100
-
101
- <target name="custom_tasks_after">
102
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
103
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
104
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
105
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
106
- </exec>
107
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
108
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
109
- </exec>
110
- </target>
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>