Permalink
Browse files

Move build to .build

To allow for it to be a folder you don't touch in almost all cases.
  • Loading branch information...
ferventcoder committed Aug 20, 2015
1 parent 781122a commit d18dbbb54d64525a6fa38be9092f7eca53ee36ae
Showing with 203 additions and 154 deletions.
  1. +1 −1 build.custom/generateBuildInfo.post.step
  2. +4 −4 build.custom/package.post.step
  3. 0 product/uppercut.build/{build → .build}/analyze.step
  4. 0 product/uppercut.build/{build → .build}/analyzers/cover.step
  5. +3 −1 product/uppercut.build/{build → .build}/analyzers/fxcop.step
  6. 0 product/uppercut.build/{build → .build}/analyzers/gallio.test.step
  7. 0 product/uppercut.build/{build → .build}/analyzers/mbunit2.test.step
  8. +5 −3 product/uppercut.build/{build → .build}/analyzers/metrics.step
  9. 0 product/uppercut.build/{build → .build}/analyzers/moma.step
  10. 0 product/uppercut.build/{build → .build}/analyzers/ncover.cover.step
  11. 0 product/uppercut.build/{build → .build}/analyzers/ndepend.step
  12. 0 product/uppercut.build/{build → .build}/analyzers/nitriq.step
  13. +21 −14 product/uppercut.build/{build → .build}/analyzers/nunit.test.step
  14. +26 −17 product/uppercut.build/{build → .build}/analyzers/opencover.cover.step
  15. 0 product/uppercut.build/{build → .build}/analyzers/test.step
  16. +14 −9 product/uppercut.build/{build → .build}/analyzers/xunit.test.step
  17. +12 −6 product/uppercut.build/{build → .build}/compile.step
  18. 0 product/uppercut.build/{build → .build}/csharp.functions
  19. +7 −6 product/uppercut.build/{build → .build}/customize.bat
  20. +1 −1 product/uppercut.build/{build → .build}/customize.build
  21. 0 product/uppercut.build/{build → .build}/customizers/item.template
  22. +0 −8 product/uppercut.build/{build → .build}/default.build
  23. +12 −2 product/uppercut.build/{build → .build}/default.build.settings
  24. 0 product/uppercut.build/{build → .build}/deploymentBuilder.step
  25. 0 product/uppercut.build/{build → .build}/environmentBuilder.step
  26. 0 product/uppercut.build/{build → .build}/gemsBuild.step
  27. 0 product/uppercut.build/{build → .build}/gemsPrepare.step
  28. 0 product/uppercut.build/{build → .build}/generateBuildInfo.step
  29. +10 −4 product/uppercut.build/{build → .build}/ilmerge.build
  30. 0 product/uppercut.build/{build → .build}/manifestBuilder.step
  31. +11 −4 product/uppercut.build/{build → .build}/nugetBuild.step
  32. 0 product/uppercut.build/{build → .build}/nugetPrepare.step
  33. +7 −2 product/uppercut.build/{build → .build}/obfuscate.step
  34. 0 product/uppercut.build/{build → .build}/open.build
  35. 0 product/uppercut.build/{build → .build}/package.step
  36. 0 product/uppercut.build/{build → .build}/policyChecks.step
  37. 0 product/uppercut.build/{build → .build}/updateAssemblies.build
  38. +4 −4 product/uppercut.build/{build → .build}/versionBuilder.step
  39. +13 −15 product/uppercut.build/{build → .build}/versioners/git.step
  40. 0 product/uppercut.build/{build → .build}/versioners/hg.step
  41. 0 product/uppercut.build/{build → .build}/versioners/svn.step
  42. 0 product/uppercut.build/{build → .build}/versioners/tfs.step
  43. 0 product/uppercut.build/{build → .build}/zip.build
  44. +1 −1 product/uppercut.build/.uppercut
  45. +1 −1 product/uppercut.build/build.bat
  46. +1 −1 product/uppercut.build/build.sh
  47. +1 −1 product/uppercut.build/open.bat
  48. +1 −1 product/uppercut.build/open.sh
  49. +2 −3 product/uppercut.build/test.bat
  50. +2 −2 product/uppercut.build/test.sh
  51. +41 −41 product/uppercut.build/uppercut.build.csproj
  52. +1 −1 product/uppercut.build/zip.bat
  53. +1 −1 product/uppercut.build/zip.sh
@@ -15,7 +15,7 @@
<property name="version.uc.full" value="${version.major}.${version.minor}.${version.build}.${version.revision}" />
<property name="version.uc.full" value="${version.major}.${version.minor}.${version.patch}.0" if="${version.use_semanticversioning}" />
<property name="folder.app.drop" value="app" overwrite="false" />
<property name="files.uppercut.info" value="${dirs.build}\${folder.app.drop}\build\UppercuT.xml" />
<property name="files.uppercut.info" value="${dirs.build}\${folder.app.drop}\.build\UppercuT.xml" />
<target name="go" depends="generate_uppercut_info_file" />
@@ -24,16 +24,16 @@
<include name="**/.uppercut" />
</fileset>
</copy>
<copy todir="${dirs.drop}\${folder.app.drop}\build\customizers">
<fileset basedir="${dirs.build}\${folder.app.drop}\build\customizers">
<copy todir="${dirs.drop}\${folder.app.drop}\.build\customizers">
<fileset basedir="${dirs.build}\${folder.app.drop}\.build\customizers">
<include name="item.template" />
</fileset>
</copy>
</target>
<target name="move_output_files">
<echo message="Moving output dlls to ${dirs.drop}\${folder.app.drop}\build."/>
<copy todir="${dirs.drop}\${folder.app.drop}\build">
<echo message="Moving output dlls to ${dirs.drop}\${folder.app.drop}\.build."/>
<copy todir="${dirs.drop}\${folder.app.drop}\.build">
<fileset basedir="${dirs.build}\${folder.app.drop}">
<exclude name="uppercut*test*.dll" />
<exclude name="uppercut.build.dll" />
@@ -73,15 +73,17 @@
<exec program="${app.fxcop}"
workingdir="${dirs.build.code}"
failonerror="${fail.build.on.error}"
if="${platform::is-windows()}"
>
<arg value="${args.fxcop}" />
</exec>
<exec program="mono"
workingdir="${dirs.build.code}"
failonerror="${fail.build.on.error}"
if="${platform::is-unix()}"
>
<arg value="'${app.fxcop}'" />
<arg value='"${app.fxcop}"' />
<arg value="${args.fxcop}" />
</exec>
</target>
@@ -69,15 +69,17 @@
<exec program="${app.metrics}"
workingdir="${dirs.build.code}"
if="${platform::is-windows()}"
failonerror="${fail.build.on.error}"
if="${platform::is-windows()}"
>
<arg line="${args.metrics}" />
</exec>
<exec program="mono"
workingdir="${dirs.build.code}"
if="${platform::is-unix()}"
failonerror="${fail.build.on.error}"
if="${platform::is-unix()}"
>
<arg line="'${app.metrics}'" />
<arg line='"${app.metrics}"' />
<arg line="${args.metrics}" />
</exec>s
</target>
@@ -47,13 +47,17 @@
<foreach item="File" property="dll.filename">
<in>
<items>
<exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}_PublishedApplications${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*Database*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*.Integration*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" />
<exclude name="${dirs.build.code}/lib/**" />
<exclude name="${dirs.build.code}/_PublishedApplications/**" />
<exclude name="${dirs.build.code}/**/*Database*dll" />
<exclude name="${dirs.build.code}/**/*database*dll" />
<exclude name="${dirs.build.code}/**/*.Integration*dll" />
<exclude name="${dirs.build.code}/**/*.integration*dll" />
<exclude name="${dirs.build.code}/**/TestFu.dll" />
<include name="${dirs.build.code}/**/*Test*dll" />
<include name="${dirs.build.code}/**/*test*dll" />
<include name="${dirs.build.code}/**/*Spec*dll" />
<include name="${dirs.build.code}/**/*spec*dll" />
</items>
</in>
<do>
@@ -73,10 +77,13 @@
<foreach item="File" property="dll.filename">
<in>
<items>
<exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" />
<exclude name="${dirs.build.code}/lib/**" />
<exclude name="${dirs.build.code}/_PublishedApplications/**" />
<exclude name="${dirs.build.code}/**/TestFu.dll" />
<include name="${dirs.build.code}/**/*Test*dll" />
<include name="${dirs.build.code}/**/*test*dll" />
<include name="${dirs.build.code}/**/*Spec*dll" />
<include name="${dirs.build.code}/**/*spec*dll" />
</items>
</in>
<do>
@@ -97,17 +104,17 @@
<exec
program="${app.test.console}"
workingdir="${dirs.build.code}"
failonerror="true"
failonerror="${fail.build.on.error}"
if="${platform::is-windows()}"
>
<arg value="${args.test_runner}" />
</exec>
<exec program="mono"
workingdir="${dirs.build.code}"
failonerror="true"
failonerror="${fail.build.on.error}"
if="${platform::is-unix()}"
>
<arg value="'${app.test.console}'" />
<arg value='"${app.test.console}"' />
<arg value="${args.test_runner}" />
</exec>
</if>
@@ -31,28 +31,33 @@
<target name="run_normal_tasks"
depends="get_test_dlls, opencover, report_generator"
description="Using OpenCover to Analyze project for test quality indicators."
if="${run.codecoverage and cover.framework == 'opencover' and file::exists(app.codecoverage)}" />
if="${run.codecoverage and cover.framework == 'opencover' and file::exists(app.codecoverage)}">
<echo level="Warning" message="OpenCover/ReportGenerator doesn't work on Mono." if="${platform::is-unix()}" />
</target>
<target name="prepare">
<echo level="Warning" message="Removing and adding ${dirs.codecoverage_results}."/>
<delete dir="${dirs.codecoverage_results}" failonerror="false" />
<mkdir dir="${dirs.codecoverage_results}" />
</target>
<target name="get_test_dlls">
<target name="get_test_dlls" if="${platform::is-windows()}">
<echo level="Warning" message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." />
<property name="dll.names" value="" />
<foreach item="File" property="dll.filename">
<in>
<items>
<exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*Database*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*.Integration*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*.integration*dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*test*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*spec*dll" />
<exclude name="${dirs.build.code}/lib/**" />
<exclude name="${dirs.build.code}/_PublishedApplications/**" />
<exclude name="${dirs.build.code}/**/*Database*dll" />
<exclude name="${dirs.build.code}/**/*database*dll" />
<exclude name="${dirs.build.code}/**/*.Integration*dll" />
<exclude name="${dirs.build.code}/**/*.integration*dll" />
<exclude name="${dirs.build.code}/**/TestFu.dll" />
<include name="${dirs.build.code}/**/*Test*dll" />
<include name="${dirs.build.code}/**/*test*dll" />
<include name="${dirs.build.code}/**/*Spec*dll" />
<include name="${dirs.build.code}/**/*spec*dll" />
</items>
</in>
<do>
@@ -68,10 +73,13 @@
<property name="args.test_runner" value="${dlls.test} ${test.args}" />
</target>
<target name="opencover" if="${file::exists(app.codecoverage) and file::exists(app.test.console) and dlls.test != ''}">
<!-- tofix: OpenCover does not work with in Mono -->
<target name="opencover" if="${platform::is-windows() and file::exists(app.codecoverage) and file::exists(app.test.console) and dlls.test != ''}">
<echo level="Warning" message="Attempting to run OpenCover. Creating file at ${file.codecoverage_results} and logging at ${file.opencover_log}." />
<exec program="regsvr32.exe" verbose="true">
<exec program="regsvr32.exe"
verbose="true"
if="${platform::is-windows()}">
<arg value="/s" />
<arg value="/n" />
<arg value="/i:user" />
@@ -85,7 +93,7 @@
<echo level="Warning" message="Running ${app.codecoverage} -target:'${app.test.console}' -targetdir:'${dirs.build.code}' -targetargs:'${dll.names}' -filter:'${codecoverage.filters}' -output:'${dirs.codecoverage_results}${path.separator}${file.codecoverage_results}' -log:All -skipautoprops" />
<exec program="${app.codecoverage}"
workingdir="${dirs.build.code}"
failonerror="false"
failonerror="${fail.build.on.error}"
if="${platform::is-windows()}"
>
<arg value='-target:"${app.test.console}"' />
@@ -98,10 +106,10 @@
</exec>
<exec program="mono"
workingdir="${dirs.build.code}"
failonerror="false"
failonerror="${fail.build.on.error}"
if="${platform::is-unix()}"
>
<arg value="'${app.codecoverage}'" />
<arg value='"${app.codecoverage}"' />
<arg value='-target:"${app.test.console}"' />
<arg value='-targetdir:"${dirs.build.code}"' />
<arg value='-targetargs:"${dll.names}"' />
@@ -112,7 +120,8 @@
</exec>
</target>
<target name="report_generator" depends="opencover" if="${file::exists(app.codecoverage.explorer)}">
<!-- tofix: ReportGenerator does not work with in Mono -->
<target name="report_generator" depends="opencover" if="${platform::is-windows() and file::exists(app.codecoverage.explorer)}">
<echo level="Warning" message="Attempting to run ReportGenerator. Creating HTML results file at ${file.html.code_coverage_results} and XML results file at ${file.xml.code_coverage_results}." />
<exec program="${app.codecoverage.explorer}"
workingdir="${dirs.build.code}"
@@ -128,7 +137,7 @@
failonerror="false"
if="${platform::is-unix()}"
>
<arg value="'${app.codecoverage.explorer}'" />
<arg value='"${app.codecoverage.explorer}"' />
<arg value='${dirs.codecoverage_results}${path.separator}${file.codecoverage_results}' />
<arg value="${dir.html.code_coverage_results}" />
<arg value="HtmlSummary" />
@@ -45,12 +45,17 @@
<in>
<items>
<exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*Database*dll" if="${not tests.run_all}" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}*.Integration*dll" if="${not tests.run_all}" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
<exclude name="${dirs.build.code}${path.separator}**${path.separator}Microsoft.*.dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
<include name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" />
<exclude name="${dirs.build.code}/_PublishedApplications/**" />
<exclude name="${dirs.build.code}/**/*Database*dll" if="${not tests.run_all}" />
<exclude name="${dirs.build.code}/**/*database*dll" if="${not tests.run_all}" />
<exclude name="${dirs.build.code}/**/*.Integration*dll" if="${not tests.run_all}" />
<exclude name="${dirs.build.code}/**/*.integration*dll" if="${not tests.run_all}" />
<exclude name="${dirs.build.code}/**/TestFu.dll" />
<exclude name="${dirs.build.code}/**/Microsoft.*.dll" />
<include name="${dirs.build.code}/**/*Test*dll" />
<include name="${dirs.build.code}/**/*test*dll" />
<include name="${dirs.build.code}/**/*Spec*dll" />
<include name="${dirs.build.code}/**/*spec*dll" />
</items>
</in>
<do>
@@ -63,18 +68,18 @@
<exec
program="${app.test.console}"
workingdir="${dirs.build.code}"
failonerror="true"
failonerror="${fail.build.on.error}"
if="${platform::is-windows()}"
>
<arg value="${args.test_runner}" />
</exec>
<exec
program="mono"
workingdir="${dirs.build.code}"
failonerror="true"
failonerror="${fail.build.on.error}"
if="${platform::is-unix()}"
>
<arg value="'${app.test.console}'" />
<arg value='"${app.test.console}"' />
<arg value="${args.test_runner}" />
</exec>
</if>
@@ -68,11 +68,15 @@
commandline='restore "${solution.path}"'
failonerror="false"
if="${platform::is-windows()}" />
<exec program="mono"
workingdir="${dirs.build}"
commandline="'${app.nuget}' restore '${solution.path}'"
failonerror="false"
if="${platform::is-unix()}" />
<exec
program="mono"
workingdir="${dirs.build}"
failonerror="false"
if="${platform::is-unix()}"
>
<arg value='"${app.nuget}"' />
<arg value='restore "${solution.path}"' />
</exec>
</target>
<target name="build_code" depends="" description="Building Library">
@@ -108,10 +112,12 @@
workingdir="${dirs.build}"
commandline="${solution.path} /nologo /property:OutputPath='${msbuild.outputpath}' /property:Configuration=${msbuild.configuration} /verbosity:minimal /noconsolelogger /target:Clean" if="${microsoft.framework.specific != 'mono-4.0'}" />
<echo level="Warning" message="Building..." />
<echo level="Warning" message="Working directory ${dirs.build}" />
<echo level="Warning" message="Running ${app.xbuild} ${solution.path} /nologo /property:OutputPath='${msbuild.outputpath}' /property:Configuration=${msbuild.configuration} /verbosity:detailed /toolsversion:${framework::get-version(microsoft.framework.specific)} /property:Platform='${msbuild.platform}' /property:TargetFrameworkVersion=v${framework::get-version(microsoft.framework.specific)} /l:${msbuild.logger};'${dirs.build_results}${path.separator}msbuild-${microsoft.framework.specific}-results.xml'" />
<exec program="${app.xbuild}"
basedir="/usr/bin"
workingdir="${dirs.build}"
commandline="${solution.path} /nologo /property:OutputPath='${msbuild.outputpath}' /property:Configuration=${msbuild.configuration} /verbosity:minimal /toolsversion:${framework::get-version(microsoft.framework.specific)} /property:Platform='${msbuild.platform}' /property:TargetFrameworkVersion=v${framework::get-version(microsoft.framework.specific)} /l:${msbuild.logger};'${dirs.build_results}${path.separator}msbuild-${microsoft.framework.specific}-results.xml'" />
commandline="${solution.path} /nologo /property:OutputPath='${msbuild.outputpath}' /property:Configuration=${msbuild.configuration} /verbosity:detailed /toolsversion:${framework::get-version(microsoft.framework.specific)} /property:Platform='${msbuild.platform}' /property:TargetFrameworkProfile='' /property:TargetFrameworkVersion=v${framework::get-version(microsoft.framework.specific)} /l:${msbuild.logger};'${dirs.build_results}${path.separator}msbuild-${microsoft.framework.specific}-results.xml'" />
</if>
<if test="${platform::is-windows()}">
<!-- nant is retarded - I had to have four of these instead of throwing an if on the outputpath and targets -->
@@ -1,4 +1,4 @@
@echo off
@echo on
::Project UppercuT - http://uppercut.googlecode.com
::No edits to this file are required - http://uppercut.pbwiki.com
@@ -15,19 +15,20 @@ SET step.name=%1
SET step.type=%2
SET DIR=%~d0%~p0%
SET NANT="%DIR%..\lib\Nant\nant.exe"
SET build.config.settings="%DIR%..\.uppercut"
SET DIR=%cd%
SET BUILD_DIR=%~d0%~p0%
SET NANT="%DIR%\lib\Nant\nant.exe"
SET build.config.settings="%DIR%\.uppercut"
%NANT% /f:.\customize.build -D:build.config.settings=%build.config.settings% -D:customize.step.name=%step.name% -D:customize.step.type=%step.type%
%NANT% /logger:"NAnt.Core.DefaultLogger" /quiet /nologo /f:"%BUILD_DIR%customize.build" -D:build.config.settings=%build.config.settings% -D:customize.step.name=%step.name% -D:customize.step.type=%step.type%
if %ERRORLEVEL% NEQ 0 goto errors
goto finish
:usage
echo.
echo Usage: customize.bat stepName customizeType
echo Usage: .build\customize.bat stepName customizeType
echo stepName is the name of the item
echo customizeType is "pre" "post" or "replace"
echo .
@@ -19,7 +19,7 @@
<property name="path.to.custom_file" value="-1" />
<property name="path.to.custom_file" value="" if="${file::exists(customize.step.name)}" />
<target name="go" depends="run_tasks, report_finish_time" />
<target name="go" depends="run_normal_tasks, report_finish_time" />
<!-- run_normal_tasks is called from run_tasks unless replace extension exists-->
<target name="run_normal_tasks"
@@ -15,7 +15,6 @@
<target name="start_recorder">
<record name="${log.build}" autoflush="true" level="Info" action="Start" failonerror="false" />
</target>
<target name="report_start_time">
@@ -58,7 +57,6 @@
<target name="build">
<call target="get_revision" />
<call target="shorten_hash" />
<call target="get_build_number" />
<call target="update_version_number" />
<call target="get_drop_directory" />
@@ -93,12 +91,6 @@
<echo level="Warning" message="Using revision number: ${version.revision} and hash: ${version.hash}." />
</target>
<target name="shorten_hash">
<echo level="Warning" message="Shortening the length of the version hash '${version.hash}' to 8 digits." />
<property name="version.hash" value="${string::substring(version.hash,0,8)}" if="${string::get-length(version.hash) > 8}" />
<echo level="Warning" message="The hash is now: ${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')}" />
Oops, something went wrong.

0 comments on commit d18dbbb

Please sign in to comment.