This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.proj
34 lines (29 loc) · 2.3 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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Utils.targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<PackagesDirectory>packages</PackagesDirectory>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
<AssemblyVersion>1.0.$(BuildNumber)</AssemblyVersion>
<Version>$(AssemblyVersion)-beta</Version>
</PropertyGroup>
<Target Name="Build">
<MSBuild Projects="DevTeam.IoC.sln" Targets="Restore;Build" BuildInParallel="true" Properties="Configuration=$(Configuration);Version=$(Version);AssemblyVersion=$(AssemblyVersion)"/>
<Message Text="##teamcity[publishArtifacts 'DevTeam.IoC.Contracts\bin\$(Configuration)\*.nupkg=>$(PackagesDirectory)']" />
<Message Text="##teamcity[publishArtifacts 'DevTeam.IoC\bin\$(Configuration)\*.nupkg=>$(PackagesDirectory)']" />
<Message Text="##teamcity[publishArtifacts 'DevTeam.IoC.Configurations.CSharp\bin\$(Configuration)\*.nupkg=>$(PackagesDirectory)']" />
<Message Text="##teamcity[publishArtifacts 'DevTeam.IoC.Configurations.Json\bin\$(Configuration)\*.nupkg=>$(PackagesDirectory)']" />
</Target>
<Target Name="GetNuGet">
<DownloadFile Url="https://dist.nuget.org/win-x86-commandline/v4.0.0/NuGet.exe" LocalFilePath="packages\nuget.exe"/>
</Target>
<Target Name="Test" DependsOnTargets="GetNuGet">
<Exec Command="dotnet test DevTeam.IoC.Tests\DevTeam.IoC.Tests.csproj -c $(Configuration) /p:TargetFramework=net452"/>
<Exec Command="dotnet test DevTeam.IoC.Tests\DevTeam.IoC.Tests.csproj -c $(Configuration) /p:TargetFramework=net462"/>
<Exec Command="dotnet test DevTeam.IoC.Tests\DevTeam.IoC.Tests.csproj -c $(Configuration) /p:TargetFramework=netcoreapp1.0"/>
<Exec Command="dotnet test DevTeam.IoC.Tests\DevTeam.IoC.Tests.csproj -c $(Configuration) /p:TargetFramework=netcoreapp2.0"/>
<Exec Command="packages\nuget.exe install xunit.runner.console -version 2.2.0 -o packages"/>
<Exec Command="packages\xunit.runner.console.2.2.0\tools\xunit.console.exe DevTeam.IoC.Tests\bin\$(Configuration)\net35\DevTeam.IoC.Tests.dll"/>
</Target>
</Project>