forked from Humanizr/Humanizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.proj
47 lines (39 loc) · 1.78 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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build;CopyToReleaseFolder" ToolsVersion="4.0">
<!--Project configuration-->
<Import Project="Build.config" />
<UsingTask TaskName="xunit" AssemblyFile="$(XUnitPath)\xunit.runner.msbuild.dll" />
<!--Clean-->
<Target Name="CleanAll" DependsOnTargets="CleanDebug;CleanRelease" />
<Target Name="CleanDebug">
<MSBuild Projects="@(ProjectToBuild)" Targets="Clean" Properties="Configuration=Debug" />
</Target>
<Target Name="CleanRelease">
<MSBuild Projects="@(ProjectToBuild)" Targets="Clean" Properties="Configuration=Release" />
</Target>
<!--Compile-->
<Target Name="Build" DependsOnTargets="CleanAll;RestorePackages">
<MSBuild Projects="@(ProjectToBuild)" Properties="Configuration=Release" />
</Target>
<!--Test. Note that the GetTestAssemblies Task MUST BE defined in the Build.config file. -->
<Target Name="Test" DependsOnTargets="GetTestAssemblies">
<xunit Assemblies="@(TestAssemblies)" />
</Target>
<!--Release-->
<Target Name="DeleteReleaseFolder">
<RemoveDir Directories="$(ReleaseFolder)" />
</Target>
<Target Name="MakeReleaseFolder" DependsOnTargets="DeleteReleaseFolder">
<MakeDir Directories="$(ReleaseFolder)" Condition="!Exists($(ReleaseFolder))" />
</Target>
<Target Name="CopyToReleaseFolder" DependsOnTargets="Test">
<Copy SourceFiles="@(BuildOutput)" DestinationFolder="$(ReleaseFolder)" />
</Target>
<!--Nuget restore-->
<ItemGroup>
<Solution Include="$(MSBuildThisFileDirectory)src\*.sln" />
</ItemGroup>
<Target Name="RestorePackages">
<Exec Command=""$(MSBuildThisFileDirectory)tools\NuGet\NuGet.exe" restore "%(Solution.Identity)"" />
</Target>
</Project>