Permalink
Browse files

Changing build so that it archives all necessary files, not just the …

….exe
  • Loading branch information...
1 parent fc1adee commit 16ddaad55f0ac8a7f6398225ef6edbfc907a74a8 @joshuaflanagan committed May 20, 2009
Showing with 58 additions and 5 deletions.
  1. +38 −4 Build.proj
  2. +19 −0 src/Docu.Console/BuildInfo.cs
  3. +1 −0 src/Docu.Console/Docu.csproj
  4. +0 −1 src/Docu.Console/Properties/AssemblyInfo.cs
View
@@ -2,16 +2,35 @@
<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
+ <BuildRevision>0</BuildRevision>
+ <!-- BUILD_NUMBER is exposed as an environment variable in TeamCity -->
+ <BuildRevision Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildRevision>
+ <!-- Manually update the 3 significant portions of the BuildVersion when appropriate -->
+ <BuildVersion>0.1.0.$(BuildRevision)</BuildVersion>
+
+ <RunningOnBuildServer>false</RunningOnBuildServer>
+ <RunningOnBuildServer Condition="'$(TEAMCITY_PROJECT_NAME)' != ''">true</RunningOnBuildServer>
<Configuration>Debug</Configuration>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\lib\MSBuildTasks</MSBuildCommunityTasksPath>
- <TestsToIgnore Condition="'$(TEAMCITY_PROJECT_NAME)' != ''">TeamCityIgnore</TestsToIgnore>
+ <TestsToIgnore Condition="$(RunningOnBuildServer)">TeamCityIgnore</TestsToIgnore>
</PropertyGroup>
<Import Project="lib\MSBuildTasks\MSBuild.Community.Tasks.Targets" />
-<Target Name="Build" DependsOnTargets="Compile;Test;Document;Package" />
+<Target Name="Build" DependsOnTargets="Clean;Compile;Test;Document;Merge;Package" />
+
+<Target Name="GenerateBuildInfo" Condition="$(RunningOnBuildServer)">
+ <AssemblyInfo CodeLanguage="CS" OutputFile="src\docu.console\BuildInfo.cs"
+ AssemblyVersion="$(BuildVersion)"
+ AssemblyFileVersion="$(BuildVersion)" />
+
+</Target>
-<Target Name="Compile">
+<Target Name="Clean">
+ <RemoveDir Directories="artifacts" />
+</Target>
+
+<Target Name="Compile" DependsOnTargets="GenerateBuildInfo">
<MSbuild Projects="src\Docu.sln" Properties="Configuration=$(Configuration)" />
</Target>
@@ -24,8 +43,23 @@
<Exec Command="src\Docu.Console\bin\$(Configuration)\docu.exe src\Docu.Console\bin\$(Configuration)\docu.exe --output=artifacts\enduserDocs --templates=src\enduserDocTemplates" />
</Target>
-<Target Name="Package">
+<Target Name="Merge">
<Exec Command="lib\ilmerge\ILMerge.exe /Out:artifacts\docu.exe src\Docu.Console\bin\$(Configuration)\docu.exe lib\spark\Spark.dll lib\spark\SparkLanguage.dll lib\spark\Interop.SparkLanguagePackageLib.dll lib\structuremap\structuremap.dll" />
<Message Text="Created artifacts\docu.exe" />
</Target>
+
+<Target Name="Package">
+ <ItemGroup>
+ <DefaultTemplates Include="src\docu.console\templates\**" />
+ </ItemGroup>
+ <Copy SourceFiles="LICENSE.txt" DestinationFolder="artifacts" />
+ <Copy SourceFiles="@(DefaultTemplates)" DestinationFolder="artifacts\templates\%(DefaultTemplates.RecursiveDir)" />
+
+ <ItemGroup>
+ <FilesToZip Include="artifacts\**" />
+ <Zip Files="@(FilesToZip)" ZipFileName="artifacts\published\docu_$(BuildVersion).zip" />
+ </ItemGroup>
+
+</Target>
+
</Project>
@@ -0,0 +1,19 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.3053
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
+
+
@@ -65,6 +65,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="BuildInfo.cs" />
<Compile Include="Console\ISwitch.cs" />
<Compile Include="Console\ParameterSwitch.cs" />
<Compile Include="Console\Switch.cs" />
@@ -4,4 +4,3 @@
[assembly:AssemblyDescription("Simple documentation done simply")]
[assembly:AssemblyProduct("Docu")]
[assembly:AssemblyCopyright("Copyright © James Gregory 2009")]
-[assembly:AssemblyVersion("0.1.0.0")]

0 comments on commit 16ddaad

Please sign in to comment.