uppercutbuild 0.9.0.346.20100805 → 1.0.0.0.20100806
Sign up to get free protection for your applications and to get access to all the features.
- 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/policyChecks.step
CHANGED
@@ -1,81 +1,82 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="PolicyEnforcer" 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="file.custom.step.
|
20
|
-
<property name="file.custom.step.
|
21
|
-
<property name="
|
22
|
-
<property name="
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
<call target="
|
30
|
-
<call target="
|
31
|
-
<call target="
|
32
|
-
<call target="
|
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
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="PolicyEnforcer" 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="policyChecks" />
|
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.documentation" value="docs" overwrite="false" />
|
15
|
+
<property name="dirs.docs" value="${path::get-full-path(dirs.current)}${path.separator}${path.to.toplevel}${path.separator}${folder.documentation}" />
|
16
|
+
<property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
|
17
|
+
<property name="file.installation_document" value="${dirs.docs}${path.separator}Installation${path.separator}Install.docx" overwrite="false" />
|
18
|
+
<property name="fail.if_no_installation_document" value="false" overwrite="false" />
|
19
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
|
20
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
|
21
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
|
22
|
+
<property name="is.replaced" value="false" />
|
23
|
+
<property name="fail.build.on.error" value="true" />
|
24
|
+
|
25
|
+
<target name="go" depends="run_tasks" />
|
26
|
+
|
27
|
+
<target name="run_tasks">
|
28
|
+
<echo message="Running ${project::get-name()} tasks." />
|
29
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
30
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
31
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
32
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
33
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
34
|
+
</target>
|
35
|
+
|
36
|
+
<target name="run_normal_tasks"
|
37
|
+
depends="install_document_policy"
|
38
|
+
description="Enforcing active rules/policies." />
|
39
|
+
|
40
|
+
<target name="custom_tasks_before">
|
41
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
42
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
43
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
44
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
45
|
+
</exec>
|
46
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
47
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
48
|
+
</exec>
|
49
|
+
</target>
|
50
|
+
|
51
|
+
<target name="custom_tasks_replace">
|
52
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
53
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
54
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
55
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
56
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
57
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
58
|
+
</exec>
|
59
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
60
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
61
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
62
|
+
</exec>
|
63
|
+
</target>
|
64
|
+
|
65
|
+
<target name="install_document_policy">
|
66
|
+
<echo message="Checking for the existence of ${path::get-full-path(file.installation_document)}. Do we fail the build if it is missing? ${fail.if_no_installation_document}" />
|
67
|
+
<fail message="You must provide an installation document as a matter of policy."
|
68
|
+
if="${fail.if_no_installation_document == 'true' and not file::exists(file.installation_document)}" />
|
69
|
+
</target>
|
70
|
+
|
71
|
+
<target name="custom_tasks_after">
|
72
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
73
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
74
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
75
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
76
|
+
</exec>
|
77
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
78
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
79
|
+
</exec>
|
80
|
+
</target>
|
81
|
+
|
81
82
|
</project>
|
@@ -1,107 +1,108 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="AssemblyDropper" default="go">
|
3
|
-
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
-
<!-- DO NOT EDIT THIS FILE - This moves output files from your project to a folder to be consumed by other applications through something like externals - 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="file.custom.step.
|
23
|
-
<property name="file.custom.step.
|
24
|
-
<property name="
|
25
|
-
<property name="
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<
|
32
|
-
<call target="
|
33
|
-
<call target="
|
34
|
-
<call target="
|
35
|
-
<call target="
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<
|
56
|
-
<
|
57
|
-
<
|
58
|
-
<
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<
|
84
|
-
<
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="AssemblyDropper" default="go">
|
3
|
+
<!-- Project UppercuT - http://projectuppercut.org -->
|
4
|
+
<!-- DO NOT EDIT THIS FILE - This moves output files from your project to a folder to be consumed by other applications through something like externals - 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="updateAssemblies" />
|
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.separator}${folder.build_scripts_custom}" />
|
14
|
+
<property name="folder.code_drop" value="code_drop" overwrite="false" />
|
15
|
+
<property name="dirs.drop" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_drop}" overwrite="false" />
|
16
|
+
<property name="folder.app.drop" value="${project.name}" overwrite="false" />
|
17
|
+
<property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
|
18
|
+
<property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
|
19
|
+
<property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${file.uppercut.assembly}" />
|
20
|
+
<property name="dirs.assemblies" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}assemblies" overwrite="false" />
|
21
|
+
<property name="allow.powershell.unrestricted" value="false" overwrite="false" />
|
22
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.build" />
|
23
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.build" />
|
24
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.build" />
|
25
|
+
<property name="is.replaced" value="false" />
|
26
|
+
<property name="fail.build.on.error" value="true" />
|
27
|
+
|
28
|
+
<target name="go" depends="load_uppercut_assemblies, allow_powershell_unrestricted, run_tasks" />
|
29
|
+
|
30
|
+
<target name="run_tasks">
|
31
|
+
<echo message="Running ${project::get-name()} tasks." />
|
32
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
33
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
34
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
35
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
36
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
37
|
+
</target>
|
38
|
+
|
39
|
+
<target name="run_normal_tasks"
|
40
|
+
depends="error_check, update_assemblies"
|
41
|
+
description="Moving assemblies to make available for Externals." />
|
42
|
+
|
43
|
+
<target name="custom_tasks_before">
|
44
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
45
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
46
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
47
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
48
|
+
</exec>
|
49
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
50
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
51
|
+
</exec>
|
52
|
+
</target>
|
53
|
+
|
54
|
+
<target name="custom_tasks_replace">
|
55
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
56
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
57
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
58
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
59
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
60
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
61
|
+
</exec>
|
62
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
63
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
64
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
65
|
+
</exec>
|
66
|
+
</target>
|
67
|
+
|
68
|
+
<target name="error_check">
|
69
|
+
<fail message="You must provide arguments to the command line like this updateAssemblies.build -D:project.name='SOLUTION_NAME_WITHOUT_EXTENSION' or pass the build configuration settings file updateAssemblies.build -D:build.config.settings='Settings${path.separator}Uppercut.config"
|
70
|
+
if="${project.name=='__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__'}" />
|
71
|
+
</target>
|
72
|
+
|
73
|
+
<target name="update_assemblies">
|
74
|
+
<echo message="Moving files to ${dirs.assemblies}." />
|
75
|
+
<copy todir="${dirs.assemblies}">
|
76
|
+
<fileset basedir="${dirs.drop}${path.separator}${folder.app.drop}">
|
77
|
+
<include name="**/*.*" />
|
78
|
+
</fileset>
|
79
|
+
</copy>
|
80
|
+
</target>
|
81
|
+
|
82
|
+
<target name="custom_tasks_after">
|
83
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
84
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
85
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
86
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
87
|
+
</exec>
|
88
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
89
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
90
|
+
</exec>
|
91
|
+
</target>
|
92
|
+
|
93
|
+
<target name="load_uppercut_assemblies">
|
94
|
+
<loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
|
95
|
+
</target>
|
96
|
+
|
97
|
+
<target name="allow_powershell_unrestricted">
|
98
|
+
<!-- powershell 1.0 -->
|
99
|
+
<exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
|
100
|
+
<arg value="set-executionpolicy unrestricted" />
|
101
|
+
</exec>
|
102
|
+
<!-- powershell 2.0 -->
|
103
|
+
<exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
|
104
|
+
<arg value="set-executionpolicy unrestricted -force -scope CurrentUser" />
|
105
|
+
</exec>
|
106
|
+
</target>
|
107
|
+
|
107
108
|
</project>
|
data/lib/build/uppercut.dll
CHANGED
Binary file
|
Binary file
|
@@ -1,148 +1,150 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
-
<project name="VersionBuilder" 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="
|
17
|
-
<property name="
|
18
|
-
<property name="
|
19
|
-
<property name="language.
|
20
|
-
<property name="
|
21
|
-
<property name="
|
22
|
-
<property name="version
|
23
|
-
<property name="version.
|
24
|
-
<property name="version.
|
25
|
-
<property name="version.
|
26
|
-
<property name="version.
|
27
|
-
<property name="
|
28
|
-
<property name="
|
29
|
-
<property name="
|
30
|
-
<property name="
|
31
|
-
<property name="
|
32
|
-
<property name="sign.
|
33
|
-
<property name="
|
34
|
-
<property name="
|
35
|
-
<property name="
|
36
|
-
<property name="file.key.name.
|
37
|
-
<property name="file.
|
38
|
-
<property name="file.
|
39
|
-
<property name="file.custom.step.
|
40
|
-
<property name="
|
41
|
-
<property name="
|
42
|
-
|
43
|
-
<
|
44
|
-
|
45
|
-
<target name="run_tasks"
|
46
|
-
|
47
|
-
|
48
|
-
<
|
49
|
-
<call target="
|
50
|
-
<call target="
|
51
|
-
<call target="
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<
|
73
|
-
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace
|
74
|
-
<
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
<import namespace="System
|
116
|
-
<import namespace="System.
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
<attribute type="
|
122
|
-
<attribute type="
|
123
|
-
<attribute type="
|
124
|
-
<attribute type="
|
125
|
-
<attribute type="
|
126
|
-
<attribute type="
|
127
|
-
<attribute type="
|
128
|
-
<attribute type="
|
129
|
-
<attribute type="
|
130
|
-
<attribute type="
|
131
|
-
<attribute type="
|
132
|
-
<attribute type="
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
<
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<project name="VersionBuilder" 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="versionBuilder" />
|
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="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
|
17
|
+
<property name="company.name" value="__COMPANY_NAME__" overwrite="false" />
|
18
|
+
<property name="path_to_solution" value="." overwrite="false" />
|
19
|
+
<property name="language.short" value="cs" overwrite="false" />
|
20
|
+
<property name="language.long" value="CSharp" />
|
21
|
+
<property name="file.version" value="SolutionVersion.${language.short}" overwrite="false" />
|
22
|
+
<property name="path.file.version" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${path_to_solution}${path.separator}${file.version}" overwrite="false" />
|
23
|
+
<property name="version.major" value="1" 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" overwrite="false" />
|
27
|
+
<property name="version.revision" value="0" overwrite="false" />
|
28
|
+
<property name="version.hash" value="${version.revision}" overwrite="false" />
|
29
|
+
<property name="assembly.description" value="${project.name} is a product of ${company.name}" overwrite="false" />
|
30
|
+
<property name="assembly.clscompliant" value="true" overwrite="false" />
|
31
|
+
<property name="allow.partially_trusted_callers" value="true" overwrite="false" />
|
32
|
+
<property name="sign.project_with_key" value="false" overwrite="false" />
|
33
|
+
<property name="sign.key.use_relative_pathing" value="false" overwrite="false" />
|
34
|
+
<property name="sign.key.relative_path_from_projects" value="..${path.separator}..${path.separator}" overwrite="false" />
|
35
|
+
<property name="app.strongname" value="C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\sn.exe" overwrite="false" />
|
36
|
+
<property name="file.key.name.private" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${project.name}.snk" overwrite="false" />
|
37
|
+
<property name="file.key.name.private" value="${path.to.toplevel}${path.separator}${project.name}.snk" overwrite="false" if="${sign.key.use_relative_pathing}" />
|
38
|
+
<property name="file.key.name.public" value="${dirs.build}${path.separator}public.${project.name}.snk" overwrite="false" />
|
39
|
+
<property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
|
40
|
+
<property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
|
41
|
+
<property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
|
42
|
+
<property name="is.replaced" value="false" />
|
43
|
+
<property name="fail.build.on.error" value="true" />
|
44
|
+
|
45
|
+
<target name="go" depends="run_tasks" />
|
46
|
+
|
47
|
+
<target name="run_tasks">
|
48
|
+
<echo message="Running ${project::get-name()} tasks." />
|
49
|
+
<call target="prepare" if="${target::exists('prepare')}" />
|
50
|
+
<call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
|
51
|
+
<call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
|
52
|
+
<call target="run_normal_tasks" if="${not is.replaced}" />
|
53
|
+
<call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
|
54
|
+
</target>
|
55
|
+
|
56
|
+
<target name="run_normal_tasks"
|
57
|
+
depends="error_check, determine_language, generate_key_file, generate_assembly_info"
|
58
|
+
description="Generating Assembly File." />
|
59
|
+
|
60
|
+
<target name="custom_tasks_before">
|
61
|
+
<echo message="Running custom tasks if ${file.custom.step.before} exists." />
|
62
|
+
<nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
|
63
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
|
64
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
|
65
|
+
</exec>
|
66
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
|
67
|
+
<arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
|
68
|
+
</exec>
|
69
|
+
</target>
|
70
|
+
|
71
|
+
<target name="custom_tasks_replace">
|
72
|
+
<echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
|
73
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
|
74
|
+
<nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
|
75
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
|
76
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
|
77
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
|
78
|
+
</exec>
|
79
|
+
<property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
|
80
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
|
81
|
+
<arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
|
82
|
+
</exec>
|
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 company.name=='__COMPANY_NAME__'}" />
|
88
|
+
</target>
|
89
|
+
|
90
|
+
<target name="generate_key_file" description="Generates a .snk using the sn.exe tool if none exists and strong naming is specified" if="${sign.project_with_key}">
|
91
|
+
<echo message="Generating a strong name key (${file.key.name.private}) using ${app.strongname} if the key file doesn't already exist." />
|
92
|
+
<exec
|
93
|
+
program="${app.strongname}"
|
94
|
+
commandline="-k ${file.key.name.private}"
|
95
|
+
if="${file::exists(app.strongname) and not file::exists(file.key.name.private)}"
|
96
|
+
/>
|
97
|
+
|
98
|
+
<exec
|
99
|
+
program="${app.strongname}"
|
100
|
+
commandline="-p ${file.key.name.private} ${file.key.name.public}"
|
101
|
+
if="${file::exists(app.strongname)}"
|
102
|
+
/>
|
103
|
+
</target>
|
104
|
+
|
105
|
+
<target name="determine_language">
|
106
|
+
<if test="${language.short=='vb'}">
|
107
|
+
<property name="language.long" value="VB" />
|
108
|
+
</if>
|
109
|
+
</target>
|
110
|
+
|
111
|
+
<target name="generate_assembly_info" description="Generate assembly info">
|
112
|
+
<echo message="Generating SolutionVersion.${language.short} with assembly version ${version.major}.${version.minor}.${version.build}.${version.revision}." />
|
113
|
+
<asminfo output="${path.file.version}" language="${language.long}">
|
114
|
+
<imports>
|
115
|
+
<import namespace="System" />
|
116
|
+
<import namespace="System.Reflection" />
|
117
|
+
<import namespace="System.Runtime.InteropServices" />
|
118
|
+
<import namespace="System.Security" />
|
119
|
+
</imports>
|
120
|
+
<attributes>
|
121
|
+
<attribute type="ComVisibleAttribute" value="false" />
|
122
|
+
<attribute type="CLSCompliantAttribute" value="${assembly.clscompliant}" />
|
123
|
+
<attribute type="AssemblyCompanyAttribute" value="${company.name}" />
|
124
|
+
<attribute type="AssemblyVersionAttribute" value="${version.major}.${version.minor}.${version.patch}.0" />
|
125
|
+
<attribute type="AssemblyFileVersionAttribute" value="${version.major}.${version.minor}.${version.patch}.${version.build}" />
|
126
|
+
<attribute type="AssemblyInformationalVersionAttribute" value="${version.major}.${version.minor}.${version.patch}.${version.hash}" />
|
127
|
+
<attribute type="AssemblyTitleAttribute" value="${project.name}" />
|
128
|
+
<attribute type="AssemblyProductAttribute" value="${project.name}" />
|
129
|
+
<attribute type="AssemblyDescriptionAttribute" value="${assembly.description}" />
|
130
|
+
<attribute type="AssemblyTrademarkAttribute" value="${project.name} - ${company.name}" />
|
131
|
+
<attribute type="AssemblyCopyrightAttribute" value="Copyright ${datetime::get-year(datetime::now())} ${company.name}, - Original author or authors" />
|
132
|
+
<attribute type="AllowPartiallyTrustedCallers" if="${allow.partially_trusted_callers}" asis="true" />
|
133
|
+
<attribute type="AssemblyKeyFileAttribute" value="${file.key.name.private}" if="${sign.project_with_key and not sign.key.use_relative_pathing}" />
|
134
|
+
<attribute type="AssemblyKeyFileAttribute" value="${sign.key.relative_path_from_projects}${path.separator}${path::get-file-name(file.key.name.private)}" if="${sign.project_with_key and sign.key.use_relative_pathing}" />
|
135
|
+
</attributes>
|
136
|
+
</asminfo>
|
137
|
+
</target>
|
138
|
+
|
139
|
+
<target name="custom_tasks_after">
|
140
|
+
<echo message="Running custom tasks if ${file.custom.step.after} exists." />
|
141
|
+
<nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
|
142
|
+
<exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
|
143
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
|
144
|
+
</exec>
|
145
|
+
<exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
|
146
|
+
<arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
|
147
|
+
</exec>
|
148
|
+
</target>
|
149
|
+
|
148
150
|
</project>
|