forked from jagregory/docu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Build.proj
68 lines (54 loc) · 2.96 KB
/
Build.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="utf-8"?>
<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>$(BuildRevision)</BuildVersion>
<RunningOnBuildServer>false</RunningOnBuildServer>
<RunningOnBuildServer Condition="'$(TEAMCITY_PROJECT_NAME)' != ''">true</RunningOnBuildServer>
<Configuration>Debug</Configuration>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\lib\MSBuildTasks</MSBuildCommunityTasksPath>
<TestsToIgnore Condition="$(RunningOnBuildServer)">TeamCityIgnore</TestsToIgnore>
</PropertyGroup>
<Import Project="lib\MSBuildTasks\MSBuild.Community.Tasks.Targets" />
<Target Name="Build" DependsOnTargets="Clean;Compile;Test;Document;Merge;Publish" />
<Target Name="GenerateBuildInfo" Condition="$(RunningOnBuildServer)">
<AssemblyInfo CodeLanguage="CS" OutputFile="src\docu.console\BuildInfo.cs"
AssemblyVersion="$(BuildVersion)"
AssemblyFileVersion="$(BuildVersion)" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="artifacts" />
</Target>
<Target Name="Compile" DependsOnTargets="GenerateBuildInfo">
<MSbuild Projects="src\Docu.sln" Properties="Configuration=$(Configuration)" />
</Target>
<Target Name="Test">
<NUnit Assemblies="src\Docu.Tests\bin\$(Configuration)\Docu.Tests.dll"
ExcludeCategory="$(TestsToIgnore)" ToolPath="lib\nunit" />
</Target>
<Target Name="Document">
<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="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)" />
</Target>
<Target Name="Publish" DependsOnTargets="Package" Condition="$(RunningOnBuildServer)">
<!-- All files in artifacts\published will be available for download from the teamcity.codebetter.com website -->
<ItemGroup>
<FilesToZip Include="artifacts\**" />
</ItemGroup>
<MakeDir Directories="artifacts\published" />
<Zip Files="@(FilesToZip)" WorkingDirectory="artifacts" ZipFileName="artifacts\published\docu_$(BuildVersion).zip" />
</Target>
</Project>