forked from TestStack/White
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestStack.White.proj
50 lines (43 loc) · 2.69 KB
/
TestStack.White.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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Test;Publish" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Root>$(MSBuildProjectDirectory)\</Root>
<BuildPlatform Condition="$(BuildPlatform) == ''">Any CPU</BuildPlatform>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
<MSBuildCommunityTasksPath>$(Root)tools\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
<xUnit>$(Root)tools\xUnit\xunit.console.exe</xUnit>
</PropertyGroup>
<Target Name="Cleanup">
<Error Condition="$(Root) == ''" Text="Root variable must be defined" />
<!-- Diagnostics -->
<Message Text="Diagnostics:"/>
<Message Text="Project root: $(Root)" />
<Message Text="Drop path: build\Artifacts" />
<!-- Clean up -->
<ItemGroup>
<FilesToDelete Include="$(Root)**\bin\**\*.*" />
<FilesToDelete Include="$(Root)**\obj\**\*.*" />
<FilesToDelete Include="$(Root)build\Artifacts\**\*.*" />
</ItemGroup>
<Delete Files="@(FilesToDelete)" ContinueOnError="true" />
<Delete Files="$(Root)build\Artifacts" />
</Target>
<Target Name="Build" DependsOnTargets="Cleanup">
<MSBuild Projects="$(Root)src\TestStack.White.sln" Properties="Configuration=$(Configuration);Platform=$(BuildPlatform)" ToolsVersion="4.0" />
</Target>
<Target Name="Test" DependsOnTargets="Build">
<Exec Command="$(xUnit) $(Root)src\TestStack.White.UnitTests\bin\$(Configuration)\TestStack.White.UnitTests.dll" />
</Target>
<Target Name="UITests" DependsOnTargets="Build">
<PropertyGroup>
<UITestFolder Condition="'$(UITestFolder)' == ''">$(Root)src\TestStack.White.UITests\bin\$(Configuration)\</UITestFolder>
</PropertyGroup>
<Exec Command="$(xUnit) $(UITestFolder)TestStack.White.UITests.dll /noshadow" />
</Target>
<Target Name="Publish">
<MakeDir Directories="$(Root)build\Artifacts" />
<Exec Command="$(Root)src\.nuget\nuget.exe pack $(Root)src\TestStack.White\TestStack.White.nuspec -Version $(GitVersion_LegacySemVer) -OutputDir $(Root)build\Artifacts -BasePath $(Root)src\TestStack.White\bin\$(Configuration)" />
<Exec Command="$(Root)src\.nuget\nuget.exe pack $(Root)src\TestStack.White.ScreenObjects\TestStack.White.ScreenObjects.nuspec -Version $(GitVersion_LegacySemVer) -OutputDir $(Root)build\Artifacts -BasePath $(Root)src\TestStack.White.ScreenObjects\bin\$(Configuration)" />
<Exec Command="$(Root)src\.nuget\nuget.exe pack $(Root)src\TestStack.White.WebBrowser\TestStack.White.WebBrowser.nuspec -Version $(GitVersion_LegacySemVer) -OutputDir $(Root)build\Artifacts -BasePath $(Root)src\TestStack.White.WebBrowser\bin\$(Configuration)" />
</Target>
</Project>