forked from chadly/Geocoding.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
teamcity.targets
53 lines (41 loc) · 2.57 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
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 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>
<!-- make sure to change the version in geocoding.nuspec as well!!! -->
<!-- TODO: get the build script to update the nuspec version automagically -->
<major>3</major>
<minor>6</minor>
<patch>0</patch>
<buildOptions>Configuration=$(configuration);major=$(major);minor=$(minor);patch=$(patch);prerelease=$(prerelease);build=$(build);yahooConsumerKey=$(yahooConsumerKey);yahooConsumerSecret=$(yahooConsumerSecret);bingMapsKey=$(bingMapsKey);googleApiKey=$(googleApiKey);mapQuestKey=$(mapQuestKey)</buildOptions>
<semver Condition="$(prerelease) == ''">$(major).$(minor).$(patch)+{build.number}</semver>
<semver Condition="$(prerelease) != ''">$(major).$(minor).$(patch)-$(prerelease)+{build.number}</semver>
</PropertyGroup>
<UsingTask AssemblyFile="packages\ILMerge.MSBuild.Tasks.1.0.0.3\tools\ILMerge.MSBuild.Tasks.dll" TaskName="ILMerge.MSBuild.Tasks.ILMerge" />
<ItemGroup>
<solutions Include="Geocoding.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>
<Target Name="Merge" DependsOnTargets="Build">
<CreateItem Include="$(MSBuildThisFileDirectory)bin\$(Configuration)\Geocoding.*.dll">
<Output TaskParameter="Include" ItemName="mergeAsm" />
</CreateItem>
<ILMerge Condition="'$(Configuration)'=='Debug'" InputAssemblies="@(mergeAsm)" OutputFile="$(MSBuildThisFileDirectory)bin\$(Configuration)\Geocoding.dll" SnkFile="$(MSBuildThisFileDirectory)geocoding.snk" DebugInfo="true" />
<ILMerge Condition="'$(Configuration)'=='Release'" InputAssemblies="@(mergeAsm)" OutputFile="$(MSBuildThisFileDirectory)bin\$(Configuration)\Geocoding.dll" SnkFile="$(MSBuildThisFileDirectory)geocoding.snk" DebugInfo="false" />
<Delete Files="@(mergeAsm)" />
<Delete Files="@(mergeAsm -> '%(RootDir)%(Directory)%(Filename).pdb')" />
</Target>
</Project>