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
@@ -39,59 +39,34 @@
39
39
  <property name="assembly.version.full" value="${version.major}.${version.minor}.${version.patch}.0" if="${version.use_semanticversioning}" />
40
40
  <property name="file.nuget.version" value="${dirs.drop.nuget}${path.separator}version.xml" />
41
41
 
42
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
43
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
44
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
45
42
  <property name="is.replaced" value="false" />
46
43
  <property name="fail.build.on.error" value="false" />
47
44
 
48
45
  <target name="go" depends="run_tasks" if="${folder.nuget.exists}" />
49
46
 
50
47
  <target name="run_tasks" if="${folder.nuget.exists}">
51
- <echo message="Running ${project::get-name()} tasks." />
52
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
53
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
48
+ <echo level="Warning" message="" />
49
+ <echo level="Warning" message="====================" />
50
+ <echo level="Warning" message="${project::get-name()}" />
51
+ <echo level="Warning" message="====================" />
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
- depends="prepare, copy_nuget_folder, copy_app_drop_to_lib_folder, copy_docs_to_doc_folder, copy_notices_to_doc_folder, update_nuspecs_with_version"
59
+ depends="prepare, copy_nuget_folder, copy_app_drop_to_lib_folder, copy_docs_to_doc_folder, copy_notices_to_doc_folder, set_file_attributes_to_normal, update_nuspecs_with_version"
60
60
  description="Packaging nuget." />
61
61
 
62
62
  <target name="prepare">
63
- <echo message="Removing and adding ${dirs.drop.nuget}."/>
63
+ <echo level="Warning" message="Removing and adding ${dirs.drop.nuget}."/>
64
64
  <delete dir="${dirs.drop.nuget}" failonerror="false" />
65
65
  <mkdir dir="${dirs.drop.nuget}" />
66
66
  </target>
67
67
 
68
- <target name="custom_tasks_before">
69
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
70
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
71
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
72
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
73
- </exec>
74
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
75
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
76
- </exec>
77
- </target>
78
-
79
- <target name="custom_tasks_replace">
80
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
81
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
82
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
83
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
84
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
85
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
86
- </exec>
87
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
88
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
89
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
90
- </exec>
91
- </target>
92
-
93
68
  <target name="copy_nuget_folder">
94
- <echo message="Packaging nuspec specifications and special files from ${dirs.nuget} to ${dirs.drop.nuget}."/>
69
+ <echo level="Warning" message="Packaging nuspec specifications and special files from ${dirs.nuget} to ${dirs.drop.nuget}."/>
95
70
  <copy todir="${dirs.drop.nuget}">
96
71
  <fileset basedir="${dirs.nuget}">
97
72
  <include name="**/**" />
@@ -100,7 +75,7 @@
100
75
  </target>
101
76
 
102
77
  <target name="copy_app_drop_to_lib_folder">
103
- <echo message="Packaging ${project.name} nuget pieces into ${dirs.drop.nuget}${path.separator}lib from ${dirs.drop}${path.separator}${folder.app.drop}."/>
78
+ <echo level="Warning" message="Packaging ${project.name} nuget pieces into ${dirs.drop.nuget}${path.separator}lib from ${dirs.drop}${path.separator}${folder.app.drop}."/>
104
79
  <copy todir="${dirs.drop.nuget}${path.separator}lib">
105
80
  <fileset basedir="${dirs.drop}${path.separator}${folder.app.drop}">
106
81
  <include name="**/**" />
@@ -109,7 +84,7 @@
109
84
  </target>
110
85
 
111
86
  <target name="copy_docs_to_doc_folder">
112
- <echo message="Packaging docs to ${dirs.drop.nuget}${path.separator}docs."/>
87
+ <echo level="Warning" message="Packaging docs to ${dirs.drop.nuget}${path.separator}docs."/>
113
88
  <copy todir="${dirs.drop.nuget}${path.separator}docs" failonerror="false">
114
89
  <fileset basedir="${dirs.drop}${path.separator}${folder.documentation}">
115
90
  <include name="**/**" />
@@ -118,10 +93,10 @@
118
93
  </target>
119
94
 
120
95
  <target name="copy_notices_to_doc_folder">
121
- <echo message="Packaging readme file to ${dirs.drop.nuget}${path.separator}docs."/>
96
+ <echo level="Warning" message="Packaging readme file to ${dirs.drop.nuget}${path.separator}docs."/>
122
97
  <copy file="${dirs.current}${path.separator}..${path.separator}README.markdown" tofile="${dirs.drop.nuget}${path.separator}docs${path.separator}README" failonerror="false" />
123
98
 
124
- <echo message="Packaging other legal stuff to ${dirs.drop.nuget}${path.separator}docs."/>
99
+ <echo level="Warning" message="Packaging other legal stuff to ${dirs.drop.nuget}${path.separator}docs."/>
125
100
  <copy todir="${dirs.drop.nuget}${path.separator}docs" failonerror="false">
126
101
  <fileset basedir="${dirs.drop}${path.separator}LEGAL">
127
102
  <include name="**/*" />
@@ -130,8 +105,8 @@
130
105
  </target>
131
106
 
132
107
  <target name="generate_version_file">
133
- <echo message="Generating ${file.nuget.version} with ${assembly.version.full} for the version" />
134
- <echo file="${file.nuget.version}" append="false" failonerror="false">
108
+ <echo level="Warning" message="Generating ${file.nuget.version} with ${assembly.version.full} for the version" />
109
+ <echo level="Warning" file="${file.nuget.version}" append="false" failonerror="false">
135
110
  <![CDATA[<?xml version="1.0" ?>
136
111
  <nuget>
137
112
  <version>${assembly.version.full}</version>
@@ -139,16 +114,25 @@
139
114
  </echo>
140
115
  </target>
141
116
 
117
+ <target name="set_file_attributes_to_normal">
118
+ <echo level="Warning" message="Removing read only attributes that some source control things put on files in '${dirs.drop.nuget}'." />
119
+ <attrib normal="true">
120
+ <fileset basedir="${dirs.drop.nuget}">
121
+ <include name="**/*" />
122
+ </fileset>
123
+ </attrib>
124
+ </target>
125
+
142
126
  <target name="update_nuspecs_with_version">
143
- <echo message="Finding and updating version in all nuspec files in ${dirs.drop.nuget}."/>
127
+ <echo level="Warning" message="Finding and updating version in all nuspec files in ${dirs.drop.nuget}."/>
144
128
  <foreach item="File" property="spec.file">
145
129
  <in>
146
130
  <items>
147
- <include name="${dirs.drop.nuget}${path.separator}*.nuspec" />
131
+ <include name="${dirs.drop.nuget}${path.separator}**${path.separator}*.nuspec" />
148
132
  </items>
149
133
  </in>
150
134
  <do>
151
- <echo message="Replacing version in '${spec.file}'" />
135
+ <echo level="Warning" message="Replacing version in '${spec.file}'" />
152
136
  <xmlpoke
153
137
  file="${spec.file}"
154
138
  xpath="/package/metadata/version"
@@ -157,15 +141,4 @@
157
141
  </foreach>
158
142
  </target>
159
143
 
160
- <target name="custom_tasks_after">
161
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
162
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
163
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
164
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
165
- </exec>
166
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
167
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
168
- </exec>
169
- </target>
170
-
171
144
  </project>
@@ -28,7 +28,9 @@
28
28
  <property name="version.build" value="0" overwrite="false" />
29
29
  <property name="version.revision" value="0" overwrite="false" />
30
30
  <property name="version.hash" value="${version.revision}" overwrite="false" />
31
- <property name="version.file" value="${version.major}.${version.minor}.${version.build}.${version.revision}" overwrite="false" />
31
+ <property name="version" value="${version.major}.${version.minor}.${version.build}.${version.revision}" />
32
+ <property name="version" value="${version.major}.${version.minor}.${version.patch}.0" if="${version.use_semanticversioning}" />
33
+ <property name="version.file" value="${version}" overwrite="false" />
32
34
 
33
35
  <property name="sign.project_with_key" value="false" overwrite="false" />
34
36
  <property name="sign.key.use_relative_pathing" value="false" overwrite="false" />
@@ -40,52 +42,27 @@
40
42
 
41
43
  <property name="dll.names" value="" />
42
44
 
43
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
44
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
45
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
46
45
  <property name="is.replaced" value="false" />
47
46
  <property name="fail.build.on.error" value="true" />
48
47
 
49
48
  <target name="go" depends="run_tasks" />
50
49
 
51
50
  <target name="run_tasks">
52
- <echo message="Running ${project::get-name()} tasks." />
51
+ <echo level="Warning" message="" />
52
+ <echo level="Warning" message="====================" />
53
+ <echo level="Warning" message="${project::get-name()}" />
54
+ <echo level="Warning" message="====================" />
53
55
  <call target="prepare" if="${target::exists('prepare')}" />
54
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
55
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
56
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
57
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
56
58
  <call target="run_normal_tasks" if="${not is.replaced}" />
57
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
59
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
58
60
  </target>
59
61
 
60
62
  <target name="run_normal_tasks"
61
63
  depends="error_check, get_version, get_project_output_files, set_up_args, obfuscate"
62
64
  description="Generating Assembly File." />
63
65
 
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
66
  <target name="error_check">
90
67
  <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."
91
68
  if="${project.name=='__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__' or company.name=='__COMPANY_NAME__'}" />
@@ -97,6 +74,7 @@
97
74
  </target>
98
75
 
99
76
  <target name="get_project_output_files">
77
+ <echo level="Warning" message="Getting all files with '${version.file}' as the file version." />
100
78
  <foreach item="File" property="dll.filename">
101
79
  <in>
102
80
  <items>
@@ -116,7 +94,7 @@
116
94
  </target>
117
95
 
118
96
  <target name="obfuscate">
119
- <echo message="Attempting to obsfucate using Eazfuscator.NET with these arguments: ${path::get-full-path(app.eazfuscator)} ${args.obfuscator}" />
97
+ <echo level="Warning" message="Attempting to obsfucate using Eazfuscator.NET with these arguments: ${path::get-full-path(app.eazfuscator)} ${args.obfuscator}" />
120
98
  <exec
121
99
  program="${path::get-full-path(app.eazfuscator)}"
122
100
  workingdir="${dirs.build.code}"
@@ -124,15 +102,4 @@
124
102
  if="${file::exists(path::get-full-path(app.eazfuscator))}" />
125
103
  </target>
126
104
 
127
- <target name="custom_tasks_after">
128
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
129
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
130
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
131
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
132
- </exec>
133
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
134
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
135
- </exec>
136
- </target>
137
-
138
105
  </project>
data/lib/build/open.build CHANGED
@@ -14,60 +14,44 @@
14
14
  <property name="dirs.solution" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${path_to_solution}" />
15
15
  <property name="solution.path" value="${path::get-full-path(dirs.solution)}${path.separator}${project.name}.sln" />
16
16
  <property name="solution.path.full" value="${path::get-full-path(solution.path)}" />
17
+ <property name="language.short" value="cs" overwrite="false" />
18
+ <property name="file.version" value="SolutionVersion.${language.short}" overwrite="false" />
19
+ <property name="path.file.version" value="${dirs.solution}${path.separator}${file.version}" overwrite="false" />
17
20
  <property name="app.visual_studio" value="${environment::get-folder-path('ProgramFiles')}\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe" />
18
21
  <property name="app.monodevelop" value="monodevelop" />
19
22
  <property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
20
23
  <property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${file.uppercut.assembly}" />
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
24
  <property name="is.replaced" value="false" />
26
25
  <property name="fail.build.on.error" value="false" />
26
+ <property name="app.ruby" value="C:\Ruby\bin\ruby.exe" overwrite="false" />
27
+ <property name="app.powershell" value="%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe" overwrite="false" />
27
28
 
28
- <target name="go" depends="load_uppercut_assemblies, allow_powershell_unrestricted, run_tasks" />
29
+ <target name="go" depends="load_uppercut_assemblies, run_tasks" />
29
30
 
30
31
  <target name="run_tasks">
31
- <echo message="Running ${project::get-name()} tasks." />
32
+ <echo level="Warning" message="" />
33
+ <echo level="Warning" message="====================" />
34
+ <echo level="Warning" message="${project::get-name()}" />
35
+ <echo level="Warning" message="====================" />
32
36
  <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')}" />
37
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
38
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
35
39
  <call target="run_normal_tasks" if="${not is.replaced}" />
36
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
40
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
37
41
  </target>
38
42
 
39
43
  <target name="run_normal_tasks"
40
- depends="open_visual_studio"
44
+ depends="build_version, open_visual_studio"
41
45
  description="Opening Visual Studio." />
42
46
 
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>
47
+ <target name="build_version">
48
+ <echo message="Checking for dependent version file." />
49
+ <nant buildfile="${dirs.current}${path.separator}versionBuilder.step" inheritall="true" if="${file::exists(path.file.version) == false}" />
66
50
  </target>
67
51
 
68
52
  <target name="open_visual_studio">
69
53
  <if test="${platform::is-unix()}">
70
- <echo message="Opening MonoDevelop with solution file ${solution.path.full}"/>
54
+ <echo level="Warning" message="Opening MonoDevelop with solution file ${solution.path.full}"/>
71
55
  <exec
72
56
  spawn="true"
73
57
  program="${app.monodevelop}"
@@ -76,41 +60,27 @@
76
60
  </exec>
77
61
  </if>
78
62
  <if test="${platform::is-windows()}">
79
- <echo message="Opening visual studio with solution file ${solution.path.full}."/>
63
+ <echo level="Warning" message="Opening visual studio with solution file ${solution.path.full}."/>
80
64
  <exec
81
65
  spawn="true"
82
66
  basedir="${dirs.solution}"
83
67
  program="${app.visual_studio}"
84
- commandline="${solution.path.full}"
68
+ commandline="${solution.path.full}"
69
+ if="${file::exists(app.visual_studio) == true}"
85
70
  >
86
71
  </exec>
72
+ <exec
73
+ spawn="true"
74
+ program="CMD.exe"
75
+ commandline="/C START ${solution.path.full}"
76
+ if="${file::exists(app.visual_studio) == false}"
77
+ >
78
+ </exec>
87
79
  </if>
88
80
  </target>
89
81
 
90
- <target name="custom_tasks_after">
91
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
92
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
93
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
94
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
95
- </exec>
96
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
97
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
98
- </exec>
99
- </target>
100
-
101
82
  <target name="load_uppercut_assemblies">
102
83
  <loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
103
84
  </target>
104
85
 
105
- <target name="allow_powershell_unrestricted">
106
- <!-- powershell 1.0 -->
107
- <exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
108
- <arg value="set-executionpolicy unrestricted" />
109
- </exec>
110
- <!-- powershell 2.0 -->
111
- <exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
112
- <arg value="set-executionpolicy unrestricted -force -scope CurrentUser" />
113
- </exec>
114
- </target>
115
-
116
86
  </project>
@@ -26,59 +26,34 @@
26
26
  <property name="folder.documentation" value="docs" overwrite="false" />
27
27
  <property name="file.build_info" value="${dirs.build}${path.separator}_BuildInfo.xml" />
28
28
  <property name="file.build_log" value="${dirs.build}${path.separator}build.log" />
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="true" />
34
31
 
35
32
  <target name="go" depends="run_tasks" />
36
33
 
37
34
  <target name="run_tasks">
38
- <echo message="Running ${project::get-name()} tasks." />
39
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
40
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
35
+ <echo level="Warning" message="" />
36
+ <echo level="Warning" message="====================" />
37
+ <echo level="Warning" message="${project::get-name()}" />
38
+ <echo level="Warning" message="====================" />
39
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
40
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
41
41
  <call target="run_normal_tasks" if="${not is.replaced}" />
42
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
42
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
43
43
  </target>
44
44
 
45
45
  <target name="run_normal_tasks"
46
- depends="prepare, build_artifacts, app, web, db, reports, file_server, environment_files, deployment_scripts, settings_files, build_deployment_files, build_info_file, documentation"
46
+ depends="prepare, build_artifacts, app, app_published, web, db, reports, file_server, environment_files, deployment_scripts, settings_files, set_file_attributes_to_normal, build_deployment_files, build_info_file, documentation"
47
47
  description="Packaging project." />
48
48
 
49
49
  <target name="prepare">
50
- <echo message="Removing and adding ${dirs.drop}."/>
50
+ <echo level="Warning" message="Removing and adding ${dirs.drop}."/>
51
51
  <delete dir="${dirs.drop}" failonerror="false" />
52
52
  <mkdir dir="${dirs.drop}" />
53
53
  </target>
54
54
 
55
- <target name="custom_tasks_before">
56
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
57
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
58
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
59
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
60
- </exec>
61
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
62
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
63
- </exec>
64
- </target>
65
-
66
- <target name="custom_tasks_replace">
67
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
68
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
69
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
70
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
71
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
72
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
73
- </exec>
74
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
75
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
76
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
77
- </exec>
78
- </target>
79
-
80
55
  <target name="build_artifacts">
81
- <echo message="Packaging build artifacts (such as test results) to ${dirs.drop}${path.separator}${folder.build_artifacts}."/>
56
+ <echo level="Warning" message="Packaging build artifacts (such as test results) to ${dirs.drop}${path.separator}${folder.build_artifacts}."/>
82
57
  <copy todir="${dirs.drop}${path.separator}${folder.build_artifacts}">
83
58
  <fileset basedir="${dirs.build}${path.separator}${folder.build_artifacts}">
84
59
  <include name="**/*.*" />
@@ -87,7 +62,7 @@
87
62
  </target>
88
63
 
89
64
  <target name="app">
90
- <echo message="Packaging application items to ${dirs.drop}${path.separator}${folder.app.drop}."/>
65
+ <echo level="Warning" message="Packaging application items to ${dirs.drop}${path.separator}${folder.app.drop}."/>
91
66
  <copy todir="${dirs.drop}${path.separator}${folder.app.drop}">
92
67
  <fileset basedir="${dirs.build}${path.separator}${folder.app.drop}">
93
68
  <exclude name="${folder.database}${path.separator}**" />
@@ -115,8 +90,18 @@
115
90
  </copy>
116
91
  </target>
117
92
 
93
+ <target name="app_published">
94
+ <echo level="Warning" message="Packaging published applications to ${dirs.drop}${path.separator}_PublishedApplications."/>
95
+ <copy todir="${dirs.drop}${path.separator}_PublishedApplications">
96
+ <fileset basedir="${dirs.build}${path.separator}${folder.app.drop}${path.separator}_PublishedApplications">
97
+ <exclude name="**${path.separator}*.template" />
98
+ <include name="**/*.*" />
99
+ </fileset>
100
+ </copy>
101
+ </target>
102
+
118
103
  <target name="web">
119
- <echo message="Packaging website to ${dirs.drop}${path.separator}_PublishedWebSites."/>
104
+ <echo level="Warning" message="Packaging website to ${dirs.drop}${path.separator}_PublishedWebSites."/>
120
105
  <copy todir="${dirs.drop}${path.separator}_PublishedWebSites">
121
106
  <fileset basedir="${dirs.build}${path.separator}${folder.app.drop}${path.separator}_PublishedWebSites">
122
107
  <exclude name="**${path.separator}*.template" />
@@ -126,7 +111,7 @@
126
111
  </target>
127
112
 
128
113
  <target name="db">
129
- <echo message="Packaging database files to ${dirs.drop}${path.separator}${folder.database}."/>
114
+ <echo level="Warning" message="Packaging database files to ${dirs.drop}${path.separator}${folder.database}."/>
130
115
  <copy todir="${dirs.drop}${path.separator}${folder.database}">
131
116
  <fileset basedir="${dirs.build}${path.separator}${folder.database}">
132
117
  <exclude name="**${path.separator}*.template" />
@@ -136,7 +121,7 @@
136
121
  </target>
137
122
 
138
123
  <target name="reports">
139
- <echo message="Packaging reports to ${dirs.drop}${path.separator}${folder.reports}."/>
124
+ <echo level="Warning" message="Packaging reports to ${dirs.drop}${path.separator}${folder.reports}."/>
140
125
  <copy todir="${dirs.drop}${path.separator}${folder.reports}">
141
126
  <fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.reports}">
142
127
  <exclude name="**${path.separator}*.template" />
@@ -146,7 +131,7 @@
146
131
  </target>
147
132
 
148
133
  <target name="file_server">
149
- <echo message="Packaging file server items to ${dirs.drop}${path.separator}${folder.file_server}."/>
134
+ <echo level="Warning" message="Packaging file server items to ${dirs.drop}${path.separator}${folder.file_server}."/>
150
135
  <copy todir="${dirs.drop}${path.separator}${folder.file_server}">
151
136
  <fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.file_server}">
152
137
  <exclude name="**${path.separator}*.template" />
@@ -154,7 +139,7 @@
154
139
  </fileset>
155
140
  </copy>
156
141
 
157
- <echo message="Packaging output fileserver items to ${dirs.drop}${path.separator}FileServer."/>
142
+ <echo level="Warning" message="Packaging output fileserver items to ${dirs.drop}${path.separator}FileServer."/>
158
143
  <copy todir="${dirs.drop}${path.separator}FileServer">
159
144
  <fileset basedir="${dirs.build}${path.separator}${folder.app.drop}${path.separator}FileServer">
160
145
  <include name="**/**" />
@@ -163,7 +148,7 @@
163
148
  </target>
164
149
 
165
150
  <target name="environment_files">
166
- <echo message="Packaging environment files to ${dirs.drop}${path.separator}${folder.environment_files}."/>
151
+ <echo level="Warning" message="Packaging environment files to ${dirs.drop}${path.separator}${folder.environment_files}."/>
167
152
  <copy todir="${dirs.drop}${path.separator}${folder.environment_files}">
168
153
  <fileset basedir="${dirs.build}${path.separator}${folder.environment_files}">
169
154
  <include name="**/*.*" />
@@ -172,7 +157,7 @@
172
157
  </target>
173
158
 
174
159
  <target name="deployment_scripts">
175
- <echo message="Packaging deployment scripts to ${dirs.drop}${path.separator}${folder.deployment}."/>
160
+ <echo level="Warning" message="Packaging deployment scripts to ${dirs.drop}${path.separator}${folder.deployment}."/>
176
161
  <copy todir="${dirs.drop}${path.separator}${folder.deployment}">
177
162
  <fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.deployment}">
178
163
  <exclude name="**${path.separator}*.template" />
@@ -183,32 +168,36 @@
183
168
  </target>
184
169
 
185
170
  <target name="settings_files">
186
- <echo message="Packaging settings files to ${dirs.drop}${path.separator}${folder.settings}."/>
171
+ <echo level="Warning" message="Packaging settings files to ${dirs.drop}${path.separator}${folder.settings}."/>
187
172
  <copy todir="${dirs.drop}${path.separator}${folder.settings}">
188
173
  <fileset basedir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.settings}">
189
174
  <include name="**/*.settings" />
190
175
  </fileset>
191
176
  </copy>
192
177
  </target>
178
+
179
+ <target name="set_file_attributes_to_normal">
180
+ <echo level="Warning" message="Removing read only attributes that some source control things put on files in '${dirs.drop}'." />
181
+ <attrib normal="true">
182
+ <fileset basedir="${dirs.drop}">
183
+ <include name="**/*" />
184
+ </fileset>
185
+ </attrib>
186
+ </target>
193
187
 
194
188
  <target name="build_deployment_files">
195
- <echo message="Building Deployment Files."/>
189
+ <echo level="Warning" message="Building Deployment Files."/>
196
190
  <nant buildfile="deploymentBuilder.step" inheritall="true" failonerror="false" />
197
191
  </target>
198
192
 
199
193
  <target name="build_info_file">
200
- <echo message="Copying ${file.build_info} to ${folder.build_artifacts}, ${folder.app.drop}, and ${folder.deployment} in the ${dirs.drop} folder."/>
194
+ <echo level="Warning" message="Copying ${file.build_info} to ${folder.build_artifacts}, ${folder.app.drop}, and ${folder.deployment} in the ${dirs.drop} folder."/>
201
195
 
202
196
  <copy
203
197
  file="${file.build_info}"
204
198
  todir="${dirs.drop}${path.separator}${folder.build_artifacts}"
205
199
  />
206
200
 
207
- <copy
208
- file="${file.build_log}"
209
- todir="${dirs.drop}${path.separator}${folder.build_artifacts}"
210
- />
211
-
212
201
  <copy
213
202
  file="${file.build_info}"
214
203
  todir="${dirs.drop}${path.separator}${folder.app.drop}"
@@ -221,7 +210,7 @@
221
210
  </target>
222
211
 
223
212
  <target name="documentation">
224
- <echo message="Packaging documentation files to ${dirs.drop}${path.separator}${folder.documentation}."/>
213
+ <echo level="Warning" message="Packaging documentation files to ${dirs.drop}${path.separator}${folder.documentation}."/>
225
214
  <copy todir="${dirs.drop}${path.separator}${folder.documentation}">
226
215
  <fileset basedir="${dirs.build}${path.separator}${folder.documentation}">
227
216
  <include name="**/*.*" />
@@ -229,15 +218,4 @@
229
218
  </copy>
230
219
  </target>
231
220
 
232
- <target name="custom_tasks_after">
233
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
234
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
235
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
236
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
237
- </exec>
238
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
239
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
240
- </exec>
241
- </target>
242
-
243
221
  </project>