forked from adamconnelly/WindsorAppConfigFacility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.proj
52 lines (40 loc) · 2.04 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
<?xml version="1.0"?>
<Project ToolsVersion="4.0" DefaultTargets="CI" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\.build</MSBuildCommunityTasksPath>
<Version>0.2.0.0</Version>
<BuildDirectory>build</BuildDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<NUnitToolPath>$(MSBuildProjectDirectory)\packages\NUnit.Runners.2.6.3\tools</NUnitToolPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<NUnitToolPath>/usr/bin</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>
<NUnit ToolPath="$(NUnitToolPath)" Assemblies="%(TestAssemblies.Filename)%(Extension)" WorkingDirectory="%(TestAssemblies.RelativeDir)"/>
</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>