-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildScript.msbuild
87 lines (76 loc) · 4.47 KB
/
BuildScript.msbuild
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="DeployOutput">
<Import Project="Tools\MSBuild Extension Pack\MSBuild.ExtensionPack.tasks"/>
<PropertyGroup>
<TestRunnerDirectory>Tools\NUnit 2.2.1\</TestRunnerDirectory>
<TestRunnerCommand>nunit-console.exe</TestRunnerCommand>
<Artifacts>$(CCNetArtifactDirectory)</Artifacts>
<ExtensionTasksPath>..\..\Tools\MSBuild Extension Pack\</ExtensionTasksPath>
<CCNetLabel>0.1.0.1</CCNetLabel>
<BuildLabel>$(CCNetLabel)</BuildLabel>
</PropertyGroup>
<ItemGroup>
<Project Include="TinyBDD\TinyBDD.csproj"></Project>
<Project Include="TinyBDD.Specification\TinyBDD.Specification.csproj"></Project>
<Project Include="TinyBDD.Specification.MSTest\TinyBDD.Specification.MSTest.csproj"></Project>
<Project Include="TinyBDDTests\TinyBDDTests.csproj"></Project>
<Project Include="TinyBDD.Specification.NUnit\TinyBDD.Specification.NUnit.csproj"></Project>
<Project Include="TinyBDD.Specification.NUnit.2.4.7\TinyBDD.Specification.NUnit.2.4.7.csproj"/>
<Project Include="TinyBDD.Specification.NUnit.2.5.0\TinyBDD.Specification.NUnit.2.5.0.csproj"/>
<Project Include="TinyBDD.Specification.NUnit.2.5.3\TinyBDD.Specification.NUnit.2.5.3.csproj"/>
<Project Include="TinyBDD.Specification.NUnitTests\TinyBDd.Specification.NUnitTests.csproj"/>
<TinyBDDOutput Include="TinyBDD\bin\debug\TinyBDD*.dll"/>
<TinyBDDOutput Include="TinyBDD.Specification\bin\debug\TinyBDD*.dll"/>
<TinyBDDOutput Include="TinyBDD.Specification.MSTest\bin\debug\TinyBDD*.dll"/>
<TinyBDDOutput Include="TinyBDD.Specification.NUnit\bin\debug\TinyBDD*.dll"/>
<TinyBDDOutput Include="TinyBDD.Specification.NUnit.2.4.7\bin\debug\TinyBDD*.dll"/>
<TinyBDDOutput Include="TinyBDD.Specification.NUnit.2.5.0\bin\debug\TinyBDD*.dll"/>
<TinyBDDOutput Include="TinyBDD.Specification.NUnit.2.5.3\bin\debug\TinyBDD*.dll"/>
</ItemGroup>
<ItemGroup>
<TestProject Include="TinyBDDTests\bin\debug\TinyBDDTests.dll">
<ReportName>TestResults.TinyBDDTests.xml</ReportName>
</TestProject>
<TestProject Include="TinyBDD.Specification.NUnitTests\bin\debug\TinyBDD.Specification.NUnitTests.dll">
<ReportName>TestResults.TinyBDD.Specification.NUnitTests.xml</ReportName>
</TestProject>
</ItemGroup>
<Target Name="Labeling">
<ItemGroup>
<AssemblyInfoFiles Include="**\AssemblyInfo.*" Exclude="**\.svn\**\*.*"/>
</ItemGroup>
<Message Text="@(AssemblyInfoFiles)"/>
<File TaskAction="Replace" RegexPattern='AssemblyVersion\("\d.\d.\d.\d"\)' Replacement='AssemblyVersion("$(BuildLabel)")'
Files="@(AssemblyInfoFiles)"/>
<File TaskAction="Replace" RegexPattern='AssemblyFileVersion\("\d.\d.\d.\d"\)' Replacement='AssemblyFileVersion("$(BuildLabel)")'
Files="@(AssemblyInfoFiles)"/>
</Target>
<Target Name="Compile" DependsOnTargets="Labeling">
<MSBuild Projects="@(Project)" Targets="Build"/>
</Target>
<Target Name="Test" DependsOnTargets="Compile">
<MakeDir Directories="Build"/>
<MakeDir Directories="Build\artifacts"/>
<MakeDir Directories="Build\bin"/>
<MakeDir Directories="Build\bin\TinyBDD"/>
<Exec WorkingDirectory="$(TestRunnerDirectory)"
Command="$(TestRunnerCommand) ..\..\@(TestProject) /xml=..\..\build\artifacts\%(TestProject.ReportName)"/>
</Target>
<Target Name="DeployOutput" DependsOnTargets="Test">
<ItemGroup>
<FilesToDelete Include="Build\bin\$(BuildLabel)\TinyBDD\*.*"/>
</ItemGroup>
<Delete Files="@(FilesToDelete)"/>
<Copy SourceFiles="@(TinyBDDOutput)" DestinationFolder="Build\bin\$(BuildLabel)\TinyBDD"/>
<!--
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create"
CompressFiles="@(TinyBDDOutput)"
ZipFileName="Build\bin\$(BuildLabel)\TinyBDD\TinyBDD-v$(BuildLabel).zip"/>
-->
</Target>
<Target Name="Artifacts" DependsOnTargets="DeployOutput">
<Copy SourceFiles="Build\artifacts\TestResults.TinyBDDTests.xml"
DestinationFolder="$(Artifacts)"/>
</Target>
</Project>