-
Notifications
You must be signed in to change notification settings - Fork 589
/
Build.proj
53 lines (44 loc) · 2.37 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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="RunAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
<ProjectRoot>$(MSBuildProjectDirectory)\..</ProjectRoot>
<ToolsPath>$(ProjectRoot)\tools\</ToolsPath>
<XunitPath>$(ToolsPath)xunit\</XunitPath>
<ArtifactsPath>$(ProjectRoot)\target</ArtifactsPath>
<SiteArtifactsPath>$(ArtifactsPath)\site</SiteArtifactsPath>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)</MSBuildCommunityTasksPath>
</PropertyGroup>
<Import Project="$(MSBuildProjectDirectory)\MSBuild.Community.Tasks.targets"/>
<ItemGroup>
<TestProjects Include="$(ProjectRoot)\JabbR.Tests\bin\$(Configuration)\JabbR.Tests.dll" />
</ItemGroup>
<UsingTask AssemblyFile="$(XunitPath)xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit" />
<Target Name="RunAll" DependsOnTargets="Build; RunTests; Package; ZipIt" />
<Target Name="MakeArtifactsPath">
<MakeDir Directories="$(SiteArtifactsPath)" Condition="!Exists('$(SiteArtifactsPath)')" />
</Target>
<Target Name="RunTests">
<xunit Assembly="%(TestProjects.FullPath)" />
</Target>
<Target Name="Build">
<MSBuild Projects="$(ProjectRoot)\JabbR.sln"
Targets="Build"
Properties="Configuration=$(Configuration)" />
</Target>
<Target Name="Package" DependsOnTargets="MakeArtifactsPath">
<MSBuild Projects="$(ProjectRoot)\JabbR\JabbR.csproj"
Targets="pipelinePreDeployCopyAllFilesToOneFolder"
Properties="_PackageTempDir=$(SiteArtifactsPath);
AutoParameterizationWebConfigConnectionStrings=false;
SolutionDir=$(ProjectRoot)\;
MSBuildExtensionsPath32=$(MSBuildProjectDirectory)\msbuild" />
</Target>
<Target Name="ZipIt" DependsOnTargets="Package">
<ItemGroup>
<ZipFiles Include="$(ArtifactsPath)\**\*.*" Exclude="$(ArtifactsPath)\**\*.pdb;$(ArtifactsPath)\**\*.zip" />
</ItemGroup>
<Zip Files="@(ZipFiles)" ZipFileName="$(ArtifactsPath)\site.zip" WorkingDirectory="$(SiteArtifactsPath)" />
</Target>
</Project>