-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteamcity.targets
36 lines (29 loc) · 1.34 KB
/
teamcity.targets
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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<configuration Condition="'$(configuration)'==''">Debug</configuration>
<prerelease Condition="$(branch) == 'master'"></prerelease>
<prerelease Condition="$(branch) != 'master'">$(branch)</prerelease>
<build Condition="$(BUILD_NUMBER) == ''">0</build>
<build Condition="$(BUILD_NUMBER) != ''">$(BUILD_NUMBER)</build>
<major>0</major>
<minor>4</minor>
<patch>2</patch>
<semver Condition="$(prerelease) == ''">$(major).$(minor).$(patch)+{build.number}</semver>
<semver Condition="$(prerelease) != ''">$(major).$(minor).$(patch)-$(prerelease)+{build.number}</semver>
<buildOptions>Configuration=$(configuration);major=$(major);minor=$(minor);patch=$(patch);prerelease=$(prerelease);build=$(build)</buildOptions>
</PropertyGroup>
<ItemGroup>
<solutions Include="Webhooks.sln" />
</ItemGroup>
<Target Name="Build">
<TeamCitySetBuildNumber BuildNumber="$(semver)" />
<MSBuild Projects="@(solutions)" Properties="$(buildOptions)" />
</Target>
<Target Name="Test" DependsOnTargets="Build">
<ItemGroup>
<testProjects Include="**\*.Tests.csproj" />
</ItemGroup>
<MSBuild Projects="@(testProjects)" Targets="Test" Properties="$(buildOptions)" />
</Target>
</Project>