Permalink
Browse files

Add Automated Build Process

Add FileSystemErrorLogger which outputs exceptions to
\AppData\Roaming\Endjin\Templify\errors
  • Loading branch information...
1 parent ad9cd5b commit 1dfb0697a2a7eb148d4b575b4b7d6f22a82db29f @HowardvanRooijen HowardvanRooijen committed Jan 9, 2011
Showing with 1,082 additions and 65 deletions.
  1. +1 −0 .gitignore
  2. +29 −0 Build/Build.proj
  3. +2 −0 Build/FullBuild.cmd
  4. +2 −0 Build/Package.cmd
  5. +45 −0 Build/Properties/Build.properties
  6. +19 −0 Build/Properties/CPUArchitecture.properties
  7. +17 −0 Build/Properties/Common.properties
  8. +26 −0 Build/Properties/Global.Imports
  9. +2 −0 Build/ReleaseBuild.cmd
  10. +2 −0 Build/ReleaseBuild_Dont_Increment_Version.cmd
  11. +2 −0 Build/RunSpecs.cmd
  12. BIN Build/Signing/YouTrackSharp.snk
  13. +17 −0 Build/Targets/BuildSolutions.target
  14. +11 −0 Build/Targets/BuildSuccess.target
  15. +14 −0 Build/Targets/CleanSolution.target
  16. +22 −0 Build/Targets/CodeCoverage.target
  17. +12 −0 Build/Targets/CreateDrops.target
  18. +16 −0 Build/Targets/Package.target
  19. +45 −0 Build/Targets/RunSpecs.target
  20. +9 −0 Build/Targets/Template.target
  21. +23 −0 Build/Targets/VersionNumberGenerate.target
  22. +14 −0 Build/Targets/VersionNumberGetLast.target
  23. +20 −0 Build/Targets/VersionNumberIncrement.target
  24. BIN Build/Tasks/ICSharpCode.SharpZipLib.dll
  25. BIN Build/Tasks/MSBuild.Community.Tasks.dll
  26. +74 −0 Build/Tasks/MSBuild.Community.tasks
  27. BIN Build/Tasks/MSBuild.Extended.Tasks.dll
  28. +27 −0 Build/Tasks/MSBuild.Extended.tasks
  29. +227 −0 Build/Tasks/Microsoft.Sdc.Common.tasks
  30. BIN Build/Tasks/Microsoft.Sdc.Tasks.dll
  31. +146 −0 Build/Templify.Build.csproj
  32. +110 −0 Build/Tools/DotCover/dotCover.xml
  33. BIN Build/Versioning/VersionNumber.exe
  34. +9 −0 Build/Versioning/VersionNumber.exe.config
  35. +4 −0 Common/AssemblyVersion.cs
  36. +3 −0 Solutions/Endjin.Templify.Client/Endjin.Templify.Client.csproj
  37. +2 −16 Solutions/Endjin.Templify.Client/Properties/AssemblyInfo.cs
  38. +10 −1 Solutions/Endjin.Templify.Client/ViewModel/CreatePackageViewModel.cs
  39. +2 −0 Solutions/Endjin.Templify.Client/ViewModel/CreatePackageViewModel.g.cs
  40. +6 −1 Solutions/Endjin.Templify.Client/ViewModel/DeployPackageViewModel.cs
  41. +2 −0 Solutions/Endjin.Templify.Client/ViewModel/DeployPackageViewModel.g.cs
  42. +6 −1 Solutions/Endjin.Templify.Client/ViewModel/ManagePackagesViewModel.cs
  43. +3 −0 Solutions/Endjin.Templify.CommandLine/Endjin.Templify.CommandLine.csproj
  44. +2 −15 Solutions/Endjin.Templify.CommandLine/Properties/AssemblyInfo.cs
  45. +9 −0 Solutions/Endjin.Templify.Domain/Contracts/Framework/Loggers/IErrorLogger.cs
  46. +5 −1 Solutions/Endjin.Templify.Domain/Domain/Packager/Processors/SevenZipProcessor.cs
  47. +5 −0 Solutions/Endjin.Templify.Domain/Endjin.Templify.Domain.csproj
  48. +54 −0 Solutions/Endjin.Templify.Domain/Framework/Loggers/FileSystemErrorLogger.cs
  49. +5 −0 Solutions/Endjin.Templify.Domain/Infrastructure/FilePaths.cs
  50. +2 −15 Solutions/Endjin.Templify.Domain/Properties/AssemblyInfo.cs
  51. +3 −0 Solutions/Endjin.Templify.Specifications/Endjin.Templify.Specifications.csproj
  52. +2 −15 Solutions/Endjin.Templify.Specifications/Properties/AssemblyInfo.cs
  53. +14 −0 Solutions/Endjin.Templify.sln
View
@@ -5,6 +5,7 @@ Debug
Debug_NoPostSharp
release
Release
+Drops
_Resharper.*
_ReSharper.*
*.old
View
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="All" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+
+ <PropertyGroup>
+ <PropertiesPath>$(MSBuildProjectDirectory)\Properties</PropertiesPath>
+ </PropertyGroup>
+
+ <Import Project="$(PropertiesPath)\Global.Imports" />
+
+ <Target Name="All"
+ DependsOnTargets="Build" />
+
+ <Target Name="ConfigureSolution"
+ DependsOnTargets="VersionNumberGenerate;" />
+
+ <Target Name="Build"
+ DependsOnTargets="PreBuild;
+ BuildSolutions;
+ RunSpecs;
+ CodeCoverage;
+ Package;
+ BuildSuccess" />
+
+ <Target Name="PreBuild"
+ DependsOnTargets="CleanSolution;
+ ConfigureSolution;
+ VersionNumberIncrement;" />
+
+</Project>
View
@@ -0,0 +1,2 @@
+%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild %0\..\Build.proj /p:IsDesktopBuild=true
+pause
View
@@ -0,0 +1,2 @@
+%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild %0\..\Build.proj /t:Package /p:IsDesktopBuild=true
+pause
@@ -0,0 +1,45 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <PropertyGroup>
+ <SolutionName>Endjin.Templify</SolutionName>
+ </PropertyGroup>
+
+ <!-- Core Path Variables -->
+ <PropertyGroup>
+ <BuildPath Condition="'$(BuildPath)'==''">$(MSBuildProjectDirectory)</BuildPath>
+ <SolutionsPath Condition="'$(SolutionsPath)'==''">$(MSBuildProjectDirectory)\..\Solutions</SolutionsPath>
+ <SolutionRoot Condition="'$(SolutionRoot)'==''">$(BuildPath)\..\..</SolutionRoot>
+ <ApplicationsPath Condition="'$(ApplicationsPath)'==''">$(SolutionsPath)</ApplicationsPath>
+ <TasksPath Condition="'$(TasksPath)'==''">$(BuildPath)\Tasks</TasksPath>
+ <TargetsPath Condition="'$(TargetsPath)'==''">$(BuildPath)\Targets</TargetsPath>
+ <ToolsPath>$(BuildPath)\Tools</ToolsPath>
+ </PropertyGroup>
+
+ <!-- Core Build Properties -->
+ <PropertyGroup>
+ <IsDesktopBuild>true</IsDesktopBuild>
+ <AssemblyVersionFile>$(BuildPath)\..\Common\AssemblyVersion.cs</AssemblyVersionFile>
+ <DropsPath>$(BuildPath)\..\Drops</DropsPath>
+ <ForcedMSBuildProperties>Configuration=Release;Platform=Any CPU</ForcedMSBuildProperties>
+ <GlobalBuildVersionNumber></GlobalBuildVersionNumber>
+ <InstallerNameWithoutExtension>$(SolutionName).Setup</InstallerNameWithoutExtension>
+ <ReferencedAssembliesPath>$(BuildPath)\..\ReferencedAssemblies</ReferencedAssembliesPath>
+ <WebAppPath>$(SolutionsPath)\$(SolutionName).Web</WebAppPath>
+ <PackageName>$(SolutionName)</PackageName>
+ <VersioningPath>$(BuildPath)\Versioning</VersioningPath>
+ <VersionXmlFile>$(VersioningPath)\VersionNumber.exe.config</VersionXmlFile>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <WorkingDirectory>$(SolutionRoot)</WorkingDirectory>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <SolutionsToBuild Include="$(SolutionsPath)\$(SolutionName).sln;"/>
+ <ProjectBuildArtefactFolders Include="$(ApplicationsPath)\$(SolutionName)\bin;
+ $(ApplicationsPath)\$(SolutionName)\obj;
+ $(DeploymentProjectPath)\bin;
+ $(DeploymentProjectPath)\obj" />
+ </ItemGroup>
+
+</Project>
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Choose>
+ <When Condition=" ('$(PROCESSOR_ARCHITECTURE)'=='x86') AND ('$(PROCESSOR_ARCHITEW6432)'=='') ">
+ </When>
+ <When Condition=" ('$(PROCESSOR_ARCHITECTURE)'=='AMD64') AND ('$(PROCESSOR_ARCHITEW6432)'=='') ">
+ </When>
+ <!-- Running in SysWow64 -->
+ <Otherwise>
+ <PropertyGroup>
+ <ProgramFilesSuffix> (x86)</ProgramFilesSuffix>
+ <RegistryWowHive>Wow6432Node\</RegistryWowHive>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+
+</Project>
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <PropertyGroup>
+ <AtSign>%40</AtSign>
+ <PercentSign>%25</PercentSign>
+ <DoubleQuote>%22</DoubleQuote>
+ <SingleQuote>%27</SingleQuote>
+ <CarriageReturn>%0D</CarriageReturn>
+ <LineFeed>%0A</LineFeed>
+ <Tab>%09</Tab>
+ <HardNewLine>%0A%0D%0C%08</HardNewLine>
+ <SoftNewLine>%0A%20%08</SoftNewLine>
+ </PropertyGroup>
+
+</Project>
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <!-- Import Project Properties -->
+ <Import Project="$(PropertiesPath)\Build.properties" />
+ <Import Project="$(PropertiesPath)\Common.properties" />
+ <Import Project="$(PropertiesPath)\CPUArchitecture.properties" />
+
+ <!-- Import Custom MSBuild Tasks -->
+ <Import Project="$(TasksPath)\Microsoft.Sdc.Common.tasks" />
+ <Import Project="$(TasksPath)\MSBuild.Community.tasks" />
+
+ <!-- Import Custom Project Targets -->
+ <Import Project="$(TargetsPath)\BuildSolutions.target" />
+ <Import Project="$(TargetsPath)\BuildSuccess.target" />
+ <Import Project="$(TargetsPath)\CleanSolution.target" />
+ <Import Project="$(TargetsPath)\CodeCoverage.target" />
+ <Import Project="$(TargetsPath)\CreateDrops.target" />
+ <Import Project="$(TargetsPath)\Package.target" />
+ <Import Project="$(TargetsPath)\RunSpecs.target" />
+ <Import Project="$(TargetsPath)\VersionNumberGenerate.target" />
+ <Import Project="$(TargetsPath)\VersionNumberGetLast.target" />
+ <Import Project="$(TargetsPath)\VersionNumberIncrement.target" />
+
+</Project>
View
@@ -0,0 +1,2 @@
+%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild %0\..\Build.proj /p:IsDesktopBuild=true
+pause
@@ -0,0 +1,2 @@
+%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild /m:4 %0\..\Build.proj /p:IsDesktopBuild=true;SkipVersionNumberIncrement=true;GlobalBuildVersionNumber=1.0.0.0
+pause
View
@@ -0,0 +1,2 @@
+%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild %0\..\Build.proj /t:RunSpecs /p:IsDesktopBuild=true
+pause
Binary file not shown.
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Target Name="BuildSolutions">
+
+ <Message Text="SolutionsToBuild: @(SolutionsToBuild)" />
+
+ <MSBuild
+ BuildInParallel="true"
+ Projects="@(SolutionsToBuild)"
+ Properties="$(ForcedMSBuildProperties);BuildNumber=$(GlobalBuildVersionNumber)">
+ <Output ItemName="TargetOutputs" TaskParameter="TargetOutputs"/>
+ </MSBuild>
+
+ </Target>
+
+</Project>
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="BuildSuccess">
+ <Message Text="---------------"/>
+ <Message Text="BUILD SUCCEEDED"/>
+ <Message Text="---------------"/>
+ </Target>
+
+</Project>
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="CleanSolution">
+
+ <Message Text="Cleaning up temp files prior to build" Importance="High"/>
+
+ <RemoveDir Directories="@(ProjectBuildArtefactFolders)" />
+ <!--<CleanFolder Path="$(DropsPath)" Force="True"/>-->
+
+ </Target>
+
+</Project>
@@ -0,0 +1,22 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Target Name="CodeCoverage"
+ DependsOnTargets="RunSpecs"
+ Condition="'$(IsDesktopBuild)' != 'true'">
+
+ <PropertyGroup>
+ <DotCoverToolPath>C:\Program Files (x86)\JetBrains\TeamCity\buildAgent\plugins\dotCover\bin\dotCover.exe</DotCoverToolPath>
+ <CoverageOptions>c</CoverageOptions>
+ <CoverageArgs>$(ToolsPath)\DotCover\dotcover.xml</CoverageArgs>
+ <CoverageCommand>&quot;$(DotCoverToolPath)&quot; $(CoverageOptions) &quot;$(CoverageArgs)&quot;</CoverageCommand>
+ </PropertyGroup>
+
+ <Message Importance="high" Text="Running Coverage with this command: $(CoverageCommand)"/>
+
+ <Exec Command="$(CoverageCommand)" />
+
+ <Message Text="##teamcity[importData type='dotNetCoverage' tool='dotcover' path='C:\Builds\Endjin\OSS\Templify\Solutions\Endjin.Templify.Specifications\bin\Release\coverage.xml']"/>
+
+ </Target>
+
+</Project>
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="CreateDrops"
+ DependsOnTargets="VersionNumberGetLast">
+
+ <MakeDir Directories="$(DropsPath)\$(GlobalBuildVersionNumber)\"/>
+
+ </Target>
+
+</Project>
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="Package"
+ DependsOnTargets="CreateDrops">
+
+ <Zip ZipFileName="$(DropsPath)\$(GlobalBuildVersionNumber)\$(PackageName).v$(GlobalBuildVersionNumber).zip"
+ Files="@(TargetOutputs)"
+ WorkingDirectory="$(DropsPath)\$(GlobalBuildVersionNumber)\"
+ Flatten ="True"
+ ZipLevel="10"/>
+
+ </Target>
+
+</Project>
@@ -0,0 +1,45 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Choose>
+ <When Condition="('$(OutputPath)'!='')">
+ </When>
+ <!-- Running outside of the build -->
+ <Otherwise>
+ <PropertyGroup>
+ <OutputPath>bin\debug</OutputPath>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+
+ <Choose>
+ <When Condition="('$(IsDesktopBuild)' != 'true')">
+ <PropertyGroup>
+ <ServerMSpecArg>--teamcity</ServerMSpecArg>
+ </PropertyGroup>
+ </When>
+ <!-- Running outside of the build -->
+ <Otherwise>
+ <PropertyGroup>
+ <ServerMSpecArg></ServerMSpecArg>
+ </PropertyGroup>
+ </Otherwise>
+ </Choose>
+
+ <Target Name="RunSpecs"
+ DependsOnTargets="CreateDrops">
+
+ <MakeDir Directories="$(DropsPath)\$(GlobalBuildVersionNumber)\BDDSpecs"/>
+
+ <PropertyGroup>
+ <MSpecOptions>$(ServerMSpecArg) --html $(DropsPath)\$(GlobalBuildVersionNumber)\BDDSpecs\Specs.html</MSpecOptions>
+ <MSpecArgs>$(SolutionsPath)\$(SolutionName).Specifications\Bin\Release\$(SolutionName).Specifications.dll</MSpecArgs>
+ <MSpecCommand>$(ReferencedAssembliesPath)\Machine.Specifications\MSpec.exe $(MSpecOptions) $(MSpecArgs)</MSpecCommand>
+ </PropertyGroup>
+
+ <Message Importance="high" Text="Running Specs with this command: $(MSpecCommand)"/>
+
+ <Exec Command="$(MSpecCommand)" />
+
+ </Target>
+
+</Project>
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="BuildSuccess">
+
+ </Target>
+
+</Project>
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="VersionNumberGenerate">
+
+ <attrib Files="$(BuildPath)\Versioning\VersionNumber.exe.config" ReadOnly="False"/>
+
+ <!-- plug in a custom version of VersionNumber.exe to fix "Y2k7" bug -->
+ <Exec Command="&quot;$(BuildPath)\Versioning\VersionNumber.exe&quot; &quot;$(AssemblyVersionFile)&quot;"
+ ContinueOnError="false"/>
+
+ <VersionNumber.Load ConfigFileLocation="$(VersionXmlFile)">
+ <Output TaskParameter="VersionNumber" PropertyName="GlobalBuildVersionNumber" />
+ </VersionNumber.Load>
+
+ <attrib Files="$(BuildPath)\Versioning\VersionNumber.exe.config" ReadOnly="True"/>
+
+ <Message Text="GlobalBuildVersionNumber is now $(GlobalBuildVersionNumber)" Importance="HIGH" />
+
+ </Target>
+
+</Project>
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Target Name="VersionNumberGetLast">
+
+ <VersionNumber.Load ConfigFileLocation="$(VersionXmlFile)">
+ <Output TaskParameter="VersionNumber" PropertyName="GlobalBuildVersionNumber" />
+ </VersionNumber.Load>
+
+ <Message Text="Previous VersionNumber is $(GlobalBuildVersionNumber)" Importance="HIGH" />
+
+ </Target>
+
+</Project>
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All">
+
+ <Target Name="VersionNumberIncrement"
+ Condition=" '$(IsDesktopBuild)' != 'true' AND '$(SkipVersionNumberIncrement)' != 'true' ">
+
+ <!-- plug in a custom version of VersionNumber.exe to fix "Y2k7" bug -->
+ <Exec Command="&quot;$(VersionXmlFile)\..\VersionNumber.exe&quot; &quot;$(AssemblyVersionFile)&quot;"
+ ContinueOnError="false"/>
+
+ <VersionNumber.Load ConfigFileLocation="$(VersionXmlFile)">
+ <Output TaskParameter="VersionNumber" PropertyName="GlobalBuildVersionNumber" />
+ </VersionNumber.Load>
+
+ <Message Text="GlobalBuildVersionNumber is now $(GlobalBuildVersionNumber)" Importance="HIGH" />
+
+ </Target>
+
+</Project>
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 1dfb069

Please sign in to comment.