lib/build/default.build in uppercutbuild-0.9.0.346.20100805 vs lib/build/default.build in uppercutbuild-1.0.0.0.20100806
- old
+ new
@@ -1,168 +1,172 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<project name="UppercuTBuild" default="go">
- <!-- Project UppercuT - http://projectuppercut.org -->
- <!-- 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 -->
- <property name="build.config.settings" value="__NONE__" overwrite="false" />
- <include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
- <property name="file.current.no_extension" value="default" />
- <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
- <property name="path.to.toplevel" value=".." />
- <property name="folder.build_scripts" value="build" overwrite="false" />
- <property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
- <property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}" />
- <property name="folder.code_build" value="build_output" overwrite="false" />
- <property name="dirs.build" value="${dirs.current}\${path.to.toplevel}\${folder.code_build}" />
- <property name="folder.code_drop" value="code_drop" overwrite="false" />
- <property name="dirs.drop" value="${dirs.current}\${path.to.toplevel}\${folder.code_drop}" overwrite="false" />
- <property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
- <property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
- <property name="company.name" value="__COMPANY_NAME__" overwrite="false" />
- <property name="source_control_type" value="svn" overwrite="false" />
- <property name="version.uppercut" value="0" />
- <property name="version.revision" value="0" />
- <property name="version.hash" value="${version.revision}" overwrite="false" />
- <property name="version.build" value="0" />
- <property name="allow.powershell.unrestricted" value="false" overwrite="false" />
- <property name="run.ilmerge" value="false" overwrite="false" />
- <property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
- <property name="path.uppercut.assembly" value="${dirs.current}\${file.uppercut.assembly}" />
- <property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.build" />
- <property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.build" />
- <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${file.current.no_extension}.replace.build" />
- <property name="is.replaced" value="false" />
- <property name="fail.build.on.error" value="true" />
-
- <target name="go" depends="load_uppercut_assemblies, allow_powershell_unrestricted, report_uppercut_version, run_tasks, report_finish_time" />
-
- <target name="run_tasks">
- <echo message="Running ${project::get-name()} tasks." />
- <call target="prepare" if="${target::exists('prepare')}" />
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
- <call target="run_normal_tasks" if="${not is.replaced}" />
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
- </target>
-
- <target name="run_normal_tasks"
- depends="error_check, build"
- description="Building with UppercuT default.build." />
-
- <target name="custom_tasks_before">
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
- </exec>
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
- </exec>
- </target>
-
- <target name="custom_tasks_replace">
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
- </exec>
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
- </exec>
- </target>
-
- <target name="prepare">
- <echo message="Removing and adding ${dirs.build}."/>
- <delete dir="${dirs.build}" failonerror="false" />
- <mkdir dir="${dirs.build}" failonerror="false" />
- </target>
-
- <target name="error_check">
- <fail message="You must fill out the project.name, repository.path, and company.name settings in the settings\UppercuT.config file. Please do that and retry the build."
- if="${project.name=='__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__' or repository.path=='__REPOSITORY_PATH__' or company.name=='__COMPANY_NAME__'}" />
- </target>
-
- <target name="build">
- <call target="get_revision" />
- <call target="get_build_number" />
- <call target="get_drop_directory" />
-
- <nant buildfile="${dirs.current}\policyChecks.step" inheritall="true" />
- <nant buildfile="${dirs.current}\versionBuilder.step" inheritall="true" />
- <nant buildfile="${dirs.current}\generateBuildInfo.step" inheritall="true" />
- <nant buildfile="${dirs.current}\compile.step" inheritall="true" />
- <nant buildfile="${dirs.current}\environmentBuilder.step" inheritall="true" />
- <nant buildfile="${dirs.current}\analyze.step" inheritall="true" />
- <nant buildfile="${dirs.current}\package.step" inheritall="true" />
- <nant buildfile="${dirs.current}\ilmerge.build" inheritall="true" if="${run.ilmerge}" />
- <nant buildfile="${dirs.current}\gemsPrepare.step" inheritall="true" />
- <nant buildfile="${dirs.current}\gemsBuild.step" inheritall="true" />
- </target>
-
- <target name="get_revision">
- <nant buildfile="${dirs.current}\versioners\svn.step" inheritall="true" if="${source_control_type=='svn'}" failonerror="false" />
- <nant buildfile="${dirs.current}\versioners\tfs.step" inheritall="true" if="${source_control_type=='tfs'}" failonerror="false" />
- <nant buildfile="${dirs.current}\versioners\git.step" inheritall="true" if="${source_control_type=='git'}" failonerror="false" />
- <nant buildfile="${dirs.current}\versioners\hg.step" inheritall="true" if="${source_control_type=='hg'}" failonerror="false" />
- <!--<nant buildfile="${dirs.current}\versioners\vault.step" inheritall="true" if="${source_control_type=='vault'}" />-->
- <!--<nant buildfile="${dirs.current}\versioners\vss.step" inheritall="true" if="${source_control_type=='vss'}" />-->
-
- <property name="version.revision" value="${environment::get-variable('uc.app.revision')}" if="${environment::variable-exists('uc.app.revision')}" />
- <property name="version.hash" value="${environment::get-variable('uc.app.revision.hash')}" if="${environment::variable-exists('uc.app.revision.hash')}" />
- <property name="version.hash" value="${version.revision}" if="${version.hash == '0'}" />
- <echo message="Using revision number: ${version.revision} and hash: ${version.hash}." />
- </target>
-
- <target name="get_build_number">
- <property name="version.build" value="${environment::get-variable('CCNetNumericLabel')}" if="${environment::variable-exists('CCNetNumericLabel')}" />
- <property name="version.build" value="${environment::get-variable('BUILD_NUMBER')}" if="${environment::variable-exists('BUILD_NUMBER')}" />
- <echo message="Using build number ${version.build}." />
- </target>
-
- <target name="get_drop_directory">
- <property name="dirs.drop" value="${environment::get-variable('CCNetArtifactDirectory')}\b${version.build}-r${version.revision}" if="${environment::variable-exists('CCNetArtifactDirectory')}" />
- <!--Point TeamCity at code_drop for an artifact directory. It will automatically save the files. -->
- <echo message="Compiled code drop directory will be ${path::get-full-path(dirs.drop)}." />
- </target>
-
- <target name="custom_tasks_after">
- <echo message="Running custom tasks if ${file.custom.step.after} exists." />
- <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
- </exec>
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
- </exec>
- </target>
-
- <target name="report_finish_time">
- <echo message="Build finished at ${datetime::now()} with UppercuT version ${version.uppercut}." />
- </target>
-
- <target name="report_uppercut_version">
- <xmlpeek
- file="UppercuT.xml"
- xpath="/uppercut/version"
- property="version.uppercut"
- failonerror="false" />
- <echo message="Using UppercuT version: ${version.uppercut}." />
- </target>
-
- <target name="load_uppercut_assemblies">
- <loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
- </target>
-
- <target name="allow_powershell_unrestricted">
- <!-- powershell 1.0 -->
- <exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
- <arg value="set-executionpolicy unrestricted" />
- </exec>
- <!-- powershell 2.0 -->
- <exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
- <arg value="set-executionpolicy unrestricted -force -scope CurrentUser" />
- </exec>
- </target>
-
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="UppercuTBuild" default="go">
+ <!-- Project UppercuT - http://projectuppercut.org -->
+ <!-- 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 -->
+ <property name="build.config.settings" value="__NONE__" overwrite="false" />
+ <include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
+ <property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
+ <property name="file.current.no_extension" value="default" />
+ <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
+ <property name="path.to.toplevel" value=".." />
+ <property name="folder.build_scripts" value="build" overwrite="false" />
+ <property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
+ <property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}" />
+ <property name="folder.code_build" value="build_output" overwrite="false" />
+ <property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
+ <property name="folder.code_drop" value="code_drop" overwrite="false" />
+ <property name="dirs.drop" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_drop}" overwrite="false" />
+ <property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" />
+ <property name="repository.path" value="__REPOSITORY_PATH__" overwrite="false" />
+ <property name="company.name" value="__COMPANY_NAME__" overwrite="false" />
+ <property name="source_control_type" value="svn" overwrite="false" />
+ <property name="version.uppercut" value="0" />
+ <property name="version.major" value="0" overwrite="false" />
+ <property name="version.minor" value="0" overwrite="false" />
+ <property name="version.patch" value="0" overwrite="false" />
+ <property name="version.build" value="0" />
+ <property name="version.revision" value="0" />
+ <property name="version.hash" value="${version.revision}" overwrite="false" />
+ <property name="allow.powershell.unrestricted" value="false" overwrite="false" />
+ <property name="run.ilmerge" value="false" overwrite="false" />
+ <property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
+ <property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${file.uppercut.assembly}" />
+ <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.build" />
+ <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.build" />
+ <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.build" />
+ <property name="is.replaced" value="false" />
+ <property name="fail.build.on.error" value="true" />
+
+ <target name="go" depends="load_uppercut_assemblies, allow_powershell_unrestricted, report_uppercut_version, run_tasks, report_finish_time" />
+
+ <target name="run_tasks">
+ <echo message="Running ${project::get-name()} tasks." />
+ <call target="prepare" if="${target::exists('prepare')}" />
+ <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
+ <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
+ <call target="run_normal_tasks" if="${not is.replaced}" />
+ <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
+ </target>
+
+ <target name="run_normal_tasks"
+ depends="error_check, build"
+ description="Building with UppercuT default.build." />
+
+ <target name="custom_tasks_before">
+ <echo message="Running custom tasks if ${file.custom.step.before} exists." />
+ <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
+ <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
+ <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
+ </exec>
+ <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
+ <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
+ </exec>
+ </target>
+
+ <target name="custom_tasks_replace">
+ <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
+ <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
+ <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
+ <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
+ <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
+ <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
+ </exec>
+ <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
+ <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
+ <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
+ </exec>
+ </target>
+
+ <target name="prepare">
+ <echo message="Removing and adding ${dirs.build}."/>
+ <delete dir="${dirs.build}" failonerror="false" />
+ <mkdir dir="${dirs.build}" failonerror="false" />
+ </target>
+
+ <target name="error_check">
+ <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."
+ if="${project.name=='__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__' or repository.path=='__REPOSITORY_PATH__' or company.name=='__COMPANY_NAME__'}" />
+ </target>
+
+ <target name="build">
+ <call target="get_revision" />
+ <call target="get_build_number" />
+ <call target="get_drop_directory" />
+
+ <nant buildfile="${dirs.current}${path.separator}policyChecks.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}versionBuilder.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}generateBuildInfo.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}compile.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}environmentBuilder.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}analyze.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}package.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}ilmerge.build" inheritall="true" if="${run.ilmerge}" />
+ <nant buildfile="${dirs.current}${path.separator}gemsPrepare.step" inheritall="true" />
+ <nant buildfile="${dirs.current}${path.separator}gemsBuild.step" inheritall="true" />
+ </target>
+
+ <target name="get_revision">
+ <nant buildfile="${dirs.current}${path.separator}versioners${path.separator}svn.step" inheritall="true" if="${source_control_type=='svn'}" failonerror="false" />
+ <nant buildfile="${dirs.current}${path.separator}versioners${path.separator}tfs.step" inheritall="true" if="${source_control_type=='tfs'}" failonerror="false" />
+ <nant buildfile="${dirs.current}${path.separator}versioners${path.separator}git.step" inheritall="true" if="${source_control_type=='git'}" failonerror="false" />
+ <nant buildfile="${dirs.current}${path.separator}versioners${path.separator}hg.step" inheritall="true" if="${source_control_type=='hg'}" failonerror="false" />
+ <!--<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}vault.step" inheritall="true" if="${source_control_type=='vault'}" />-->
+ <!--<nant buildfile="${dirs.current}${path.separator}versioners${path.separator}vss.step" inheritall="true" if="${source_control_type=='vss'}" />-->
+
+ <property name="version.revision" value="${environment::get-variable('uc.app.revision')}" if="${environment::variable-exists('uc.app.revision')}" />
+ <property name="version.hash" value="${environment::get-variable('uc.app.revision.hash')}" if="${environment::variable-exists('uc.app.revision.hash')}" />
+ <property name="version.hash" value="${version.revision}" if="${version.hash == '0'}" />
+ <echo message="Using revision number: ${version.revision} and hash: ${version.hash}." />
+ </target>
+
+ <target name="get_build_number">
+ <property name="version.build" value="${environment::get-variable('CCNetNumericLabel')}" if="${environment::variable-exists('CCNetNumericLabel')}" />
+ <property name="version.build" value="${environment::get-variable('BUILD_NUMBER')}" if="${environment::variable-exists('BUILD_NUMBER')}" />
+ <echo message="Using build number ${version.build}." />
+ </target>
+
+ <target name="get_drop_directory">
+ <property name="dirs.drop" value="${environment::get-variable('CCNetArtifactDirectory')}${path.separator}b${version.build}-r${version.revision}" if="${environment::variable-exists('CCNetArtifactDirectory')}" />
+ <!--Point TeamCity at code_drop for an artifact directory. It will automatically save the files. -->
+ <echo message="Compiled code drop directory will be ${path::get-full-path(dirs.drop)}." />
+ </target>
+
+ <target name="custom_tasks_after">
+ <echo message="Running custom tasks if ${file.custom.step.after} exists." />
+ <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
+ <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
+ <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
+ </exec>
+ <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
+ <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
+ </exec>
+ </target>
+
+ <target name="report_finish_time">
+ <echo message="Build finished at ${datetime::now()} with UppercuT version ${version.uppercut}." />
+ </target>
+
+ <target name="report_uppercut_version">
+ <xmlpeek
+ file="UppercuT.xml"
+ xpath="/uppercut/version"
+ property="version.uppercut"
+ failonerror="false" />
+ <echo message="Using UppercuT version: ${version.uppercut}." />
+ </target>
+
+ <target name="load_uppercut_assemblies">
+ <loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
+ </target>
+
+ <target name="allow_powershell_unrestricted">
+ <!-- powershell 1.0 -->
+ <exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
+ <arg value="set-executionpolicy unrestricted" />
+ </exec>
+ <!-- powershell 2.0 -->
+ <exec program="powershell.exe" if="${allow.powershell.unrestricted}" failonerror="false">
+ <arg value="set-executionpolicy unrestricted -force -scope CurrentUser" />
+ </exec>
+ </target>
+
</project>
\ No newline at end of file