forked from sebastienros/yessql
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.proj
59 lines (49 loc) · 2.16 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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(MSBuildProjectDirectory)\tools\xunit-1.9\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit" />
<PropertyGroup>
<ArtifactsFolder>$(MSBuildProjectDirectory)\artifacts</ArtifactsFolder>
<BuildFolder>$(MSBuildProjectDirectory)\build</BuildFolder>
<ArtifactsFolder>$(MSBuildProjectDirectory)\artifacts</ArtifactsFolder>
<SrcFolder>$(MSBuildProjectDirectory)\src</SrcFolder>
<RootFolder>$(MSBuildProjectDirectory)</RootFolder>
<Version Condition="$(BUILD_NUMBER) == ''">0.2.0</Version>
</PropertyGroup>
<Target Name ="Build">
<CallTarget Targets="Clean"/>
<CallTarget Targets="Compile"/>
<CallTarget Targets="Test" />
<CallTarget Targets="Package" />
<CallTarget Targets="Nuget" />
</Target>
<Target Name="Clean">
<MSBuild Projects="$(RootFolder)\YesSql.sln" Targets="Clean" />
<RemoveDir Directories="$(BuildFolder)" ContinueOnError="true"/>
<RemoveDir Directories="$(ArtifactsFolder)" ContinueOnError="true"/>
</Target>
<Target Name ="Compile" DependsOnTargets="Clean">
<MSBuild
Projects="$(SrcFolder)\YesSql.Core\YesSql.Core.csproj"
Targets="Build"
Properties="Configuration=Release;OutputPath=$(BuildFolder)" />
</Target>
<Target Name="Test" DependsOnTargets="Compile">
<MSBuild
Projects="$(SrcFolder)\YesSql.Tests\YesSql.Tests.csproj"
Targets="Build"
Properties="Configuration=Release;OutputPath=$(BuildFolder)" />
<xunit Assembly="$(BuildFolder)\YesSql.Tests.dll"/>
</Target>
<Target Name ="Package" DependsOnTargets="Test">
<MSBuild
Projects="$(SrcFolder)\YesSql.Core\YesSql.Core.csproj"
Targets="Build"
Properties="Configuration=Release;OutputPath=$(ArtifactsFolder)" />
</Target>
<Target Name ="Nuget" DependsOnTargets="Package">
<MSBuild
Projects="$(SrcFolder)\YesSql.Core\YesSql.Core.csproj"
Targets="Build"
Properties="Configuration=Release;PackageOutputDir=$(ArtifactsFolder);BuildPackage=True" />
</Target>
</Project>