uppercutbuild 1.3.0.0 → 1.4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/docs/README +20 -2
  2. data/docs/Samples/CC.NET/server/ccnet.config +8 -2
  3. data/lib/build.bat +1 -3
  4. data/lib/build/Castle.Core.dll +0 -0
  5. data/lib/build/Castle.DynamicProxy2.dll +0 -0
  6. data/lib/build/Castle.MicroKernel.dll +0 -0
  7. data/lib/build/Castle.Windsor.dll +0 -0
  8. data/lib/build/UppercuT.xml +1 -2
  9. data/lib/build/analyze.step +9 -44
  10. data/lib/build/analyzers/gallio.test.step +13 -49
  11. data/lib/build/analyzers/mbunit2.test.step +12 -48
  12. data/lib/build/analyzers/metrics.step +106 -0
  13. data/lib/build/analyzers/moma.step +13 -49
  14. data/lib/build/analyzers/ncover.step +14 -50
  15. data/lib/build/analyzers/ndepend.step +12 -47
  16. data/lib/build/analyzers/nitriq.step +13 -49
  17. data/lib/build/analyzers/nunit.test.step +18 -54
  18. data/lib/build/analyzers/storevil.test.step +17 -53
  19. data/lib/build/analyzers/test.step +16 -44
  20. data/lib/build/analyzers/xunit.test.step +13 -49
  21. data/lib/build/compile.step +94 -63
  22. data/lib/build/customize.build +8 -5
  23. data/lib/build/customizers/item.template +2 -1
  24. data/lib/build/default.build +27 -64
  25. data/lib/build/deploymentBuilder.step +60 -60
  26. data/lib/build/environmentBuilder.step +43 -61
  27. data/lib/build/gemsBuild.step +8 -44
  28. data/lib/build/gemsPrepare.step +17 -54
  29. data/lib/build/generateBuildInfo.step +9 -45
  30. data/lib/build/ilmerge.build +14 -60
  31. data/lib/build/nugetBuild.step +12 -45
  32. data/lib/build/nugetPrepare.step +28 -55
  33. data/lib/build/obfuscate.step +12 -45
  34. data/lib/build/open.build +28 -58
  35. data/lib/build/package.step +41 -63
  36. data/lib/build/policyChecks.step +8 -44
  37. data/lib/build/uc.exe +0 -0
  38. data/lib/build/uc.exe.config +3 -0
  39. data/lib/build/updateAssemblies.build +11 -57
  40. data/lib/build/uppercut.dll +0 -0
  41. data/lib/build/uppercut.tasks.dll +0 -0
  42. data/lib/build/versionBuilder.step +12 -44
  43. data/lib/build/versioners/git.step +8 -45
  44. data/lib/build/versioners/hg.step +8 -45
  45. data/lib/build/versioners/svn.step +8 -45
  46. data/lib/build/versioners/tfs.step +7 -43
  47. data/lib/build/zip.build +17 -63
  48. data/lib/lib/NAnt/NAnt.CompressionTasks.dll +0 -0
  49. data/lib/lib/NAnt/NAnt.Contrib.Tasks.dll +0 -0
  50. data/lib/lib/NAnt/NAnt.Core.dll +0 -0
  51. data/lib/lib/NAnt/NAnt.DotNetTasks.dll +0 -0
  52. data/lib/lib/NAnt/NAnt.MSNetTasks.dll +0 -0
  53. data/lib/lib/NAnt/NAnt.NUnit.dll +0 -0
  54. data/lib/lib/NAnt/NAnt.NUnit1Tasks.dll +0 -0
  55. data/lib/lib/NAnt/NAnt.NUnit2Tasks.dll +0 -0
  56. data/lib/lib/NAnt/NAnt.SourceControlTasks.dll +0 -0
  57. data/lib/lib/NAnt/NAnt.VSNetTasks.dll +0 -0
  58. data/lib/lib/NAnt/NAnt.VisualCppTasks.dll +0 -0
  59. data/lib/lib/NAnt/NAnt.Win32Tasks.dll +0 -0
  60. data/lib/lib/NAnt/NAnt.exe +0 -0
  61. data/lib/lib/NAnt/NAnt.exe.config +333 -136
  62. data/lib/lib/NAnt/NDoc.Documenter.NAnt.dll +0 -0
  63. data/lib/lib/NAnt/SLiNgshoT.Core.dll +0 -0
  64. data/lib/lib/NAnt/SLiNgshoT.exe +0 -0
  65. data/lib/lib/NAnt/extensions/common/2.0/NAnt.MSBuild.dll +0 -0
  66. data/lib/lib/NuGet/NuGet.exe +0 -0
  67. data/lib/open.bat +1 -1
  68. data/lib/settings/LOCAL.settings +3 -1
  69. data/lib/settings/UppercuT.config +10 -7
  70. data/lib/test.bat +2 -2
  71. data/lib/zip.bat +2 -2
  72. metadata +42 -89
  73. data/lib/lib/NAnt/MSITaskErrors.mst +0 -0
  74. data/lib/lib/NAnt/MSITaskTemplate.msi +0 -0
  75. data/lib/lib/NAnt/MSMTaskErrors.mst +0 -0
  76. data/lib/lib/NAnt/MSMTaskTemplate.msm +0 -0
  77. data/lib/lib/NAnt/NDepend.Build.NAntTasks.dll +0 -0
  78. data/lib/lib/NAnt/extensions/common/2.0/NAnt.MSBuild.xml +0 -36
  79. data/lib/lib/NAnt/lib/mono/1.0/NDoc.Core.dll +0 -0
  80. data/lib/lib/NAnt/lib/mono/1.0/NDoc.Documenter.Msdn.dll +0 -0
  81. data/lib/lib/NAnt/lib/mono/1.0/NDoc.ExtendedUI.dll +0 -0
  82. data/lib/lib/NAnt/lib/mono/1.0/nunit.core.dll +0 -0
  83. data/lib/lib/NAnt/lib/mono/1.0/nunit.framework.dll +0 -0
  84. data/lib/lib/NAnt/lib/mono/1.0/nunit.util.dll +0 -0
  85. data/lib/lib/NAnt/lib/mono/2.0/NDoc.Core.dll +0 -0
  86. data/lib/lib/NAnt/lib/mono/2.0/NDoc.Documenter.Msdn.dll +0 -0
  87. data/lib/lib/NAnt/lib/mono/2.0/NDoc.ExtendedUI.dll +0 -0
  88. data/lib/lib/NAnt/lib/mono/2.0/nunit.core.dll +0 -0
  89. data/lib/lib/NAnt/lib/mono/2.0/nunit.framework.dll +0 -0
  90. data/lib/lib/NAnt/lib/mono/2.0/nunit.util.dll +0 -0
  91. data/lib/lib/NAnt/lib/net/1.1/NDoc.Core.dll +0 -0
  92. data/lib/lib/NAnt/lib/net/1.1/NDoc.Documenter.Msdn.dll +0 -0
  93. data/lib/lib/NAnt/lib/net/1.1/NDoc.ExtendedUI.dll +0 -0
  94. data/lib/lib/NAnt/lib/net/1.1/nunit.core.dll +0 -0
  95. data/lib/lib/NAnt/lib/net/1.1/nunit.framework.dll +0 -0
  96. data/lib/lib/NAnt/lib/net/1.1/nunit.util.dll +0 -0
  97. data/lib/lib/NAnt/lib/net/2.0/NDoc.Core.dll +0 -0
  98. data/lib/lib/NAnt/lib/net/2.0/NDoc.Documenter.Msdn.dll +0 -0
  99. data/lib/lib/NAnt/lib/net/2.0/NDoc.ExtendedUI.dll +0 -0
  100. data/lib/lib/NAnt/lib/net/2.0/nunit.core.dll +0 -0
  101. data/lib/lib/NAnt/lib/net/2.0/nunit.framework.dll +0 -0
  102. data/lib/lib/NAnt/lib/net/2.0/nunit.util.dll +0 -0
@@ -27,50 +27,25 @@
27
27
  <property name="file.moma.submit_results" value="${project.name}.MoMAReport.xml" />
28
28
  <property name="file.moma_log" value="${project.name}.moma.log" />
29
29
  <property name="args.moma" value="--nogui --out &quot;${dirs.moma_results}${path.separator}${file.moma_results}&quot;" />
30
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
31
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
32
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
33
30
  <property name="is.replaced" value="false" />
34
31
  <property name="fail.build.on.error" value="false" />
35
32
 
36
33
  <target name="go" depends="run_tasks" if="${file::exists(app.moma)}" />
37
34
 
38
- <target name="run_tasks">
39
- <echo message="Running ${project::get-name()} tasks." />
35
+ <target name="run_tasks" if="${file::exists(app.moma)}">
36
+ <echo level="Warning" message="" />
37
+ <echo level="Warning" message="====================" />
38
+ <echo level="Warning" message="${project::get-name()}" />
39
+ <echo level="Warning" message="====================" />
40
40
  <call target="prepare" if="${target::exists('prepare')}" />
41
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
42
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
41
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
42
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
43
43
  <call target="run_normal_tasks" if="${not is.replaced}" />
44
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
45
- </target>
46
-
47
- <target name="custom_tasks_before">
48
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
49
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
50
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
51
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
52
- </exec>
53
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
54
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
55
- </exec>
56
- </target>
57
-
58
- <target name="custom_tasks_replace">
59
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
60
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
61
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
62
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
63
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
64
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
65
- </exec>
66
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
67
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
68
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
69
- </exec>
44
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
70
45
  </target>
71
46
 
72
47
  <target name="prepare">
73
- <echo message="Removing and adding ${dirs.moma_results}."/>
48
+ <echo level="Warning" message="Removing and adding ${dirs.moma_results}."/>
74
49
  <delete dir="${dirs.moma_results}" failonerror="false" />
75
50
  <mkdir dir="${dirs.moma_results}" />
76
51
  </target>
@@ -81,7 +56,7 @@
81
56
  if="${file::exists(app.moma)}" />
82
57
 
83
58
  <target name="get_regular_dlls">
84
- <echo message="Getting output dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
59
+ <echo level="Warning" message="Getting output dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
85
60
  <property name="dll.names" value="" />
86
61
  <foreach item="File" property="dll.filename">
87
62
  <in>
@@ -106,13 +81,13 @@
106
81
  </foreach>
107
82
 
108
83
  <property name="dlls.regular" value="${dll.names}" />
109
- <echo message="Running Mono Migration Analyzer against these files - ${dlls.regular}." />
84
+ <echo level="Warning" message="Running Mono Migration Analyzer against these files - ${dlls.regular}." />
110
85
 
111
86
  <property name="args.moma" value="${args.moma} ${dlls.regular}" />
112
87
  </target>
113
88
 
114
89
  <target name="moma" if="${file::exists(app.moma)}" >
115
- <echo message="Attempting to run Mono Migration Analyzer. Creating file at ${file.moma_results} and logging at ${file.moma_log}." />
90
+ <echo level="Warning" message="Attempting to run Mono Migration Analyzer. Creating file at ${file.moma_results} and logging at ${file.moma_log}." />
116
91
 
117
92
  <exec program="${app.moma}"
118
93
  workingdir="${dirs.build.code}"
@@ -123,19 +98,8 @@
123
98
  </target>
124
99
 
125
100
  <target name="open_results">
126
- <echo message="Opening results - ${path::get-full-path(dirs.moma_results) + path.separator + file.moma_results}."/>
101
+ <echo level="Warning" message="Opening results - ${path::get-full-path(dirs.moma_results) + path.separator + file.moma_results}."/>
127
102
  <results display="${path::get-full-path(dirs.moma_results) + path.separator + file.moma_results}" />
128
103
  </target>
129
104
 
130
- <target name="custom_tasks_after">
131
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
132
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
133
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
134
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
135
- </exec>
136
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
137
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
138
- </exec>
139
- </target>
140
-
141
105
  </project>
@@ -38,21 +38,21 @@
38
38
  <property name="test.args" value="/rt:Text /rnf:mbUnit /rf:&quot;${dirs.ncover_results}&quot; /ec:${tests.excluded_categories.comma_separated}" if="${test.framework=='mbunit2'}" />
39
39
  <property name="test.args" value="/xml:&quot;${dirs.ncover_results}${path.separator}nunit-results.xml&quot; /nologo /framework=${microsoft.framework} /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" />
40
40
  <!--property name="test.args" value="/xml:&quot;${dirs.ncover_results}\nunit-results.xml&quot; /nologo /framework=${microsoft.framework} /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" /-->
41
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
42
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
43
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
44
41
  <property name="is.replaced" value="false" />
45
42
  <property name="fail.build.on.error" value="false" />
46
43
 
47
44
  <target name="go" depends="run_tasks" if="${file::exists(app.ncover) and test.framework !='none'}" />
48
45
 
49
- <target name="run_tasks">
50
- <echo message="Running ${project::get-name()} tasks." />
46
+ <target name="run_tasks" if="${file::exists(app.ncover) and test.framework !='none'}">
47
+ <echo level="Warning" message="" />
48
+ <echo level="Warning" message="====================" />
49
+ <echo level="Warning" message="${project::get-name()}" />
50
+ <echo level="Warning" message="====================" />
51
51
  <call target="prepare" if="${target::exists('prepare')}" />
52
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
53
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
52
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
53
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
54
54
  <call target="run_normal_tasks" if="${not is.replaced}" />
55
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
55
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
56
56
  </target>
57
57
 
58
58
  <target name="run_normal_tasks"
@@ -60,39 +60,14 @@
60
60
  description="Using NCover to Analyze project for test quality indicators."
61
61
  if="${file::exists(app.ncover) and test.framework !='none'}" />
62
62
 
63
- <target name="custom_tasks_before">
64
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
65
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
66
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
67
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
68
- </exec>
69
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
70
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
71
- </exec>
72
- </target>
73
-
74
- <target name="custom_tasks_replace">
75
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
76
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
77
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
78
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
79
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
80
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
81
- </exec>
82
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
83
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
84
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
85
- </exec>
86
- </target>
87
-
88
63
  <target name="prepare">
89
- <echo message="Removing and adding ${dirs.ncover_results}."/>
64
+ <echo level="Warning" message="Removing and adding ${dirs.ncover_results}."/>
90
65
  <delete dir="${dirs.ncover_results}" failonerror="false" />
91
66
  <mkdir dir="${dirs.ncover_results}" />
92
67
  </target>
93
68
 
94
69
  <target name="get_test_dlls">
95
- <echo message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
70
+ <echo level="Warning" message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
96
71
  <property name="dll.names" value="" />
97
72
  <foreach item="File" property="dll.filename">
98
73
  <in>
@@ -111,13 +86,13 @@
111
86
  </foreach>
112
87
 
113
88
  <property name="dlls.test" value="${dll.names}" />
114
- <echo message="Running NCover against these test dlls - ${dlls.test}." />
89
+ <echo level="Warning" message="Running NCover against these test dlls - ${dlls.test}." />
115
90
 
116
91
  <property name="args.test_runner" value="${dlls.test} ${test.args}" />
117
92
  </target>
118
93
 
119
94
  <target name="ncover" if="${file::exists(app.ncover) and file::exists(app.ncover.tester)}" >
120
- <echo message="Attempting to run NCover. Creating file at ${file.ncover_results} and logging at ${file.ncover_log}." />
95
+ <echo level="Warning" message="Attempting to run NCover. Creating file at ${file.ncover_results} and logging at ${file.ncover_log}." />
121
96
  <ncover program="${app.ncover}"
122
97
  commandLineExe="${app.ncover.tester}"
123
98
  commandLineArgs="${args.test_runner}"
@@ -139,7 +114,7 @@
139
114
  </target>
140
115
 
141
116
  <target name="ncover_explorer" depends="ncover" if="${file::exists(app.ncover.explorer)}" >
142
- <echo message="Attempting to run NCoverExplorer. Creating HTML results file at ${file.html.code_coverage_results} and XML results file at ${file.xml.code_coverage_results}." />
117
+ <echo level="Warning" message="Attempting to run NCoverExplorer. Creating HTML results file at ${file.html.code_coverage_results} and XML results file at ${file.xml.code_coverage_results}." />
143
118
  <ncoverexplorer
144
119
  program="${app.ncover.explorer}"
145
120
  projectName="${project.name}"
@@ -168,19 +143,8 @@
168
143
  </target>
169
144
 
170
145
  <target name="open_results">
171
- <echo message="Opening results - ${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" />
146
+ <echo level="Warning" message="Opening results - ${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" />
172
147
  <results display="${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" />
173
148
  </target>
174
149
 
175
- <target name="custom_tasks_after">
176
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
177
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
178
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
179
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
180
- </exec>
181
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
182
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
183
- </exec>
184
- </target>
185
-
186
150
  </project>
@@ -21,21 +21,22 @@
21
21
  <property name="app.ndepend" value="C:${path.separator}Program Files${path.separator}NDepend${path.separator}NDepend.Console.exe" overwrite="false" />
22
22
  <property name="dirs.ndepend_results" value="${dirs.build_artifacts}${path.separator}ndepend" />
23
23
  <property name="files.ndepend_config" value="${path::get-full-path(dirs.current)}${path.separator}${path.to.toplevel}${path.separator}NDepend.xml" />
24
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
25
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
26
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
24
+
27
25
  <property name="is.replaced" value="false" />
28
26
  <property name="fail.build.on.error" value="false" />
29
27
 
30
28
  <target name="go" depends="run_tasks" if="${file::exists(app.ndepend)}" />
31
29
 
32
- <target name="run_tasks">
33
- <echo message="Running ${project::get-name()} tasks." />
30
+ <target name="run_tasks" if="${file::exists(app.ndepend)}">
31
+ <echo level="Warning" message="" />
32
+ <echo level="Warning" message="====================" />
33
+ <echo level="Warning" message="${project::get-name()}" />
34
+ <echo level="Warning" message="====================" />
34
35
  <call target="prepare" if="${target::exists('prepare')}" />
35
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
36
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
36
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
37
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
37
38
  <call target="run_normal_tasks" if="${not is.replaced}" />
38
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
39
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
39
40
  </target>
40
41
 
41
42
  <target name="run_normal_tasks"
@@ -44,38 +45,13 @@
44
45
  if="${file::exists(app.ndepend)}" />
45
46
 
46
47
  <target name="prepare">
47
- <echo message="Removing and adding ${dirs.ndepend_results}."/>
48
+ <echo level="Warning" message="Removing and adding ${dirs.ndepend_results}."/>
48
49
  <delete dir="${dirs.ndepend_results}" failonerror="false" />
49
50
  <mkdir dir="${dirs.ndepend_results}" />
50
51
  </target>
51
52
 
52
- <target name="custom_tasks_before">
53
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
54
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
55
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
56
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
57
- </exec>
58
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
59
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
60
- </exec>
61
- </target>
62
-
63
- <target name="custom_tasks_replace">
64
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
65
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
66
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
67
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
68
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
69
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
70
- </exec>
71
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
72
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
73
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
74
- </exec>
75
- </target>
76
-
77
53
  <target name="ndepend" depends="prepare" if="${file::exists(app.ndepend)}">
78
- <echo message="Attempting to run NDepend at ${app.ndepend} for file ${files.ndepend_config}." />
54
+ <echo level="Warning" message="Attempting to run NDepend at ${app.ndepend} for file ${files.ndepend_config}." />
79
55
 
80
56
  <exec program="${app.ndepend}">
81
57
  <arg line="${files.ndepend_config} /OutDir ${dirs.ndepend_results} /InDirs ${path::get-full-path(dirs.build.code)} C:${path.separator}WINDOWS${path.separator}Microsoft.NET${path.separator}Framework${path.separator}v2.0.50727 C:${path.separator}WINDOWS${path.separator}Microsoft.NET${path.separator}Framework${path.separator}v3.0 C:${path.separator}WINDOWS${path.separator}Microsoft.NET${path.separator}Framework${path.separator}v3.5" />
@@ -84,19 +60,8 @@
84
60
  </target>
85
61
 
86
62
  <target name="open_results">
87
- <echo message="Opening results - ${path::get-full-path(dirs.ndepend_results) + path.separator + 'NDependReport.html'}" />
63
+ <echo level="Warning" message="Opening results - ${path::get-full-path(dirs.ndepend_results) + path.separator + 'NDependReport.html'}" />
88
64
  <results display="${path::get-full-path(dirs.ndepend_results) + path.separator + 'NDependReport.html'}" />
89
65
  </target>
90
66
 
91
- <target name="custom_tasks_after">
92
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
93
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
94
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
95
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
96
- </exec>
97
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
98
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
99
- </exec>
100
- </target>
101
-
102
67
  </project>
@@ -26,28 +26,28 @@
26
26
  <property name="files.nitriq_queries" value="${path::get-full-path(dirs.current)}${path.separator}${path.to.toplevel}${path.separator}nitriq.nq" />
27
27
  <property name="file.html.nitriq_results" value="${dirs.nitriq_results}${path.separator}${project.name}.nitriq-results.html" />
28
28
 
29
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
30
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
31
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
32
29
  <property name="is.replaced" value="false" />
33
30
  <property name="fail.build.on.error" value="false" />
34
31
 
35
32
  <target name="go" depends="precheck" if="${file::exists(app.nitriq)}" />
36
33
 
37
- <target name="precheck">
38
- <echo message="Attempting to locate console edition of Nitriq." />
34
+ <target name="precheck" if="${file::exists(app.nitriq)}">
35
+ <echo level="Warning" message="Attempting to locate console edition of Nitriq." />
39
36
  <property name="app.nitriq" value="C:${path.separator}Program Files (x86)${path.separator}NimblePros${path.separator}Nitriq Console + Pro\Nitriq.Console.exe" if="${not file::exists(app.nitriq)}" />
40
37
  <property name="app.nitriq" value="C:${path.separator}Program Files${path.separator}NimblePros\Nitriq Console + Pro - Nitriq.Console.exe" if="${not file::exists(app.nitriq)}" />
41
38
  <call target="run_tasks" if="${file::exists(app.nitriq) and file::exists(files.nitriq_project)}" />
42
39
  </target>
43
40
 
44
- <target name="run_tasks">
45
- <echo message="Running ${project::get-name()} tasks." />
41
+ <target name="run_tasks">
42
+ <echo level="Warning" message="" />
43
+ <echo level="Warning" message="====================" />
44
+ <echo level="Warning" message="${project::get-name()}" />
45
+ <echo level="Warning" message="====================" />
46
46
  <call target="prepare" if="${target::exists('prepare')}" />
47
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
48
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
47
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
48
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
49
49
  <call target="run_normal_tasks" if="${not is.replaced}" />
50
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
50
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
51
51
  </target>
52
52
 
53
53
  <target name="run_normal_tasks"
@@ -56,38 +56,13 @@
56
56
  if="${file::exists(app.nitriq)}" />
57
57
 
58
58
  <target name="prepare">
59
- <echo message="Removing and adding ${dirs.nitriq_results}."/>
59
+ <echo level="Warning" message="Removing and adding ${dirs.nitriq_results}."/>
60
60
  <delete dir="${dirs.nitriq_results}" failonerror="false" />
61
61
  <mkdir dir="${dirs.nitriq_results}" />
62
62
  </target>
63
63
 
64
- <target name="custom_tasks_before">
65
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
66
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
67
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
68
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
69
- </exec>
70
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
71
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
72
- </exec>
73
- </target>
74
-
75
- <target name="custom_tasks_replace">
76
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
77
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
78
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
79
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
80
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
81
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
82
- </exec>
83
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
84
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
85
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
86
- </exec>
87
- </target>
88
-
89
64
  <target name="nitriq" depends="prepare" if="${file::exists(app.nitriq)}">
90
- <echo message="Attempting to run Nitriq at ${app.nitriq} for file ${files.nitriq_project}." />
65
+ <echo level="Warning" message="Attempting to run Nitriq at ${app.nitriq} for file ${files.nitriq_project}." />
91
66
 
92
67
  <exec program="${app.nitriq}" workingdir="${dirs.build.code}">
93
68
  <arg line="${files.nitriq_project} ${files.nitriq_queries} ${file.html.nitriq_results}" />
@@ -95,19 +70,8 @@
95
70
  </target>
96
71
 
97
72
  <target name="open_results">
98
- <echo message="Opening results - ${path::get-full-path(dirs.nitriq_results) + path.separator + file.html.nitriq_results}" />
73
+ <echo level="Warning" message="Opening results - ${path::get-full-path(dirs.nitriq_results) + path.separator + file.html.nitriq_results}" />
99
74
  <results display="${path::get-full-path(dirs.nitriq_results) + path.separator + file.html.nitriq_results}" />
100
75
  </target>
101
76
 
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
-
113
77
  </project>
@@ -36,56 +36,31 @@
36
36
  <property name="dlls.test" value="" />
37
37
  <property name="tests.ran" value="false" />
38
38
 
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
39
  <property name="is.replaced" value="false" />
43
40
  <property name="fail.build.on.error" value="true" />
44
41
 
45
- <target name="go" depends="run_tasks" />
42
+ <target name="go" depends="run_tasks" if="${file::exists(app.nunit.console)}" />
46
43
 
47
44
  <target name="run_all_tests" depends="prepare, set_nunit_failure_mode, get_test_dlls_all, run_tests, generate_report" description="Like go but runs all tests" />
48
45
 
49
- <target name="run_tasks">
50
- <echo message="Running ${project::get-name()} tasks." />
46
+ <target name="run_tasks" if="${file::exists(app.nunit.console)}" >
47
+ <echo level="Warning" message="" />
48
+ <echo level="Warning" message="====================" />
49
+ <echo level="Warning" message="${project::get-name()}" />
50
+ <echo level="Warning" message="====================" />
51
51
  <call target="prepare" if="${target::exists('prepare')}" />
52
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
53
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
52
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
53
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
54
54
  <call target="run_normal_tasks" if="${not is.replaced}" />
55
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
55
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
56
56
  </target>
57
57
 
58
58
  <target name="run_normal_tasks"
59
59
  depends="set_nunit_failure_mode, get_test_dlls, run_tests, generate_report"
60
60
  description="Testing with NUnit." />
61
61
 
62
- <target name="custom_tasks_before">
63
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
64
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
65
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
66
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
67
- </exec>
68
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
69
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
70
- </exec>
71
- </target>
72
-
73
- <target name="custom_tasks_replace">
74
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
75
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
76
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
77
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
78
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
79
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
80
- </exec>
81
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
82
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
83
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
84
- </exec>
85
- </target>
86
-
87
62
  <target name="prepare">
88
- <echo message="Removing and adding ${dirs.test_results}."/>
63
+ <echo level="Warning" message="Removing and adding ${dirs.test_results}."/>
89
64
  <delete dir="${dirs.test_results}" failonerror="false" />
90
65
  <mkdir dir="${dirs.test_results}" />
91
66
  </target>
@@ -95,7 +70,7 @@
95
70
  </target>
96
71
 
97
72
  <target name="get_test_dlls">
98
- <echo message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
73
+ <echo level="Warning" message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
99
74
  <property name="dll.names" value="" />
100
75
  <foreach item="File" property="dll.filename">
101
76
  <in>
@@ -114,13 +89,13 @@
114
89
  </foreach>
115
90
 
116
91
  <property name="dlls.test" value="${dll.names}" />
117
- <echo message="Running NUnit against these test dlls - ${dlls.test}." />
92
+ <echo level="Warning" message="Running NUnit against these test dlls - ${dlls.test}." />
118
93
 
119
94
  <property name="args.test_runner" value="${dlls.test} ${test.args} ${test.args.exclude}" />
120
95
  </target>
121
96
 
122
97
  <target name="get_test_dlls_all">
123
- <echo message="Getting all test dlls (including integration tests) based on name in directory ${path::get-full-path(dirs.build.code)}." />
98
+ <echo level="Warning" message="Getting all test dlls (including integration tests) based on name in directory ${path::get-full-path(dirs.build.code)}." />
124
99
  <property name="dll.names" value="" />
125
100
  <foreach item="File" property="dll.filename">
126
101
  <in>
@@ -137,7 +112,7 @@
137
112
  </foreach>
138
113
 
139
114
  <property name="dlls.test" value="${dll.names}" />
140
- <echo message="Running NUnit against these test dlls - ${dlls.test}." />
115
+ <echo level="Warning" message="Running NUnit against these test dlls - ${dlls.test}." />
141
116
 
142
117
  <property name="args.test_runner" value="${dlls.test} ${test.args}" />
143
118
  </target>
@@ -145,17 +120,17 @@
145
120
  <target name="run_tests" depends="prepare" description="Running Unit Tests">
146
121
 
147
122
  <if test="${dlls.test !=''}">
148
- <echo message="Running tests using NUnit and putting results in ${dirs.test_results}."/>
123
+ <property name="tests.ran" value="true" />
124
+ <echo level="Warning" message="Running tests using NUnit and putting results in ${dirs.test_results}."/>
149
125
  <exec
150
126
  program="${app.nunit.console}"
151
127
  workingdir="${dirs.build.code}"
152
128
  failonerror="true">
153
129
  <arg value="${args.test_runner}" />
154
130
  </exec>
155
- <property name="tests.ran" value="true" />
156
131
  </if>
157
132
  <if test="${dlls.test ==''}">
158
- <echo message="No test dlls to run against" />
133
+ <echo level="Warning" message="No test dlls to run against" />
159
134
  </if>
160
135
 
161
136
  </target>
@@ -171,19 +146,8 @@
171
146
  </target>
172
147
 
173
148
  <target name="open_results">
174
- <echo message="Opening results - ${path::get-full-path(dirs.test_results) + path.separator + file.test_results + '.html'}" />
149
+ <echo level="Warning" message="Opening results - ${path::get-full-path(dirs.test_results) + path.separator + file.test_results + '.html'}" />
175
150
  <results display="${path::get-full-path(dirs.test_results) + path.separator + file.test_results + '.html'}" />
176
151
  </target>
177
152
 
178
- <target name="custom_tasks_after">
179
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
180
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
181
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
182
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
183
- </exec>
184
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
185
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
186
- </exec>
187
- </target>
188
-
189
153
  </project>