-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.proj
45 lines (35 loc) · 1.92 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
<?xml version="1.0"?>
<Project ToolsVersion="4.0" DefaultTargets="CI" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\.build</MSBuildCommunityTasksPath>
<Version>1.0.0.0</Version>
<BuildDirectory>$(MSBuildProjectDirectory)\build</BuildDirectory>
<NUnitToolPath>$(MSBuildProjectDirectory)\packages\NUnit.ConsoleRunner.3.10.0\tools\nunit3-console.exe</NUnitToolPath>
</PropertyGroup>
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.targets"/>
<Target Name="CI" DependsOnTargets="Build;RunTests" />
<Target Name="GenerateAssemblyInfo">
<AssemblyInfo CodeLanguage="CS"
OutputFile="SolutionInfo.cs"
AssemblyVersion="$(Version)"
AssemblyFileVersion="$(Version)"
AssemblyCopyright="Copyright (c) Adam Connelly, 2014" />
</Target>
<Target Name="Build" DependsOnTargets="GenerateAssemblyInfo">
<MSBuild Projects="AppConfigFacility.sln" Properties="Configuration=Release;Platform=Any CPU" />
</Target>
<Target Name="RunTests" DependsOnTargets="Build">
<ItemGroup>
<TestAssemblies Include="Tests\AppConfigFacility.Tests\bin\Release\*.Tests.dll" />
<TestAssemblies Include="Tests\AppConfigFacility.Azure.Tests\bin\Release\*.Tests.dll" />
</ItemGroup>
<Exec Command="$(NUnitToolPath) %(TestAssemblies.RelativeDir)\%(Filename)%(Extension) --result:$(BuildDirectory)\%(Filename)-nunit.xml;format=nunit3" />
</Target>
<Target Name="NuGetPack" DependsOnTargets="RunTests">
<ItemGroup>
<NuSpecFiles Include="**\*.nuspec" />
</ItemGroup>
<MakeDir Condition="!Exists('$(BuildDirectory)')" Directories="$(BuildDirectory)" />
<Exec Command="NuGet pack -Symbols -OutputDirectory $(BuildDirectory) -BasePath %(NuSpecFiles.RelativeDir) -Properties version=$(Version) %(NuSpecFiles.RelativeDir)%(NuSpecFiles.Filename)%(NuSpecFiles.Extension)" />
</Target>
</Project>