Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (58 sloc) 2.8 kb
144f612 @nberardi add msbuild file and move nuspec
nberardi authored
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
4 <UsingTask TaskName="NUnitTeamCity" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />
5
6 <ItemGroup>
7 <MainProjects Include="src\**\*.csproj" />
8 <TestProjects Include="test\**\*.csproj" />
9 <AllProjects Include="@(MainProjects);@(TestProjects)" />
10 </ItemGroup>
11
12 <PropertyGroup>
13 <AssemblyName>FluentCassandra</AssemblyName>
14 <AssemblyInfo>src\Properties\AssemblyInfo.cs</AssemblyInfo>
15 <PackageBuildPath>build</PackageBuildPath>
16 <PackageId>$(AssemblyName)</PackageId>
17 <NuGetExe>lib\nuget.exe</NuGetExe>
18 <NuPackage>$(PackageBuildPath)\$(PackageId).$(build_number).nupkg</NuPackage>
19 </PropertyGroup>
20
21 <Target Name="CleanPackage">
22 <RemoveDir Directories="$(PackageBuildPath)" Condition="Exists($(PackageBuildPath))"/>
23 </Target>
24
25 <Target Name="Clean" DependsOnTargets="CleanPackage">
26 <TeamCityProgressMessage Text="Cleaning Projects" />
27 <MSBuild Projects="@(AllProjects)" Targets="Clean"/>
28 </Target>
29
30 <Target Name="SetVersion" DependsOnTargets="Clean">
31 <TeamCityProgressMessage Text="Update Version" />
32 <FileUpdate
33 Files="$(AssemblyInfo)"
34 Regex='\[assembly: (Assembly(File)?Version)\("([0-9\.\*]+)"\)\]'
35 ReplacementText='[assembly: $1("$(build_number)")]' />
36 </Target>
37
38 <Target Name="Test" DependsOnTargets="SetVersion">
39 <TeamCityProgressMessage Text="Building Tests" />
40 <MSBuild Projects="@(TestProjects)" Targets="Rebuild" Properties="Configuration=Release">
41 <Output TaskParameter="TargetOutputs" ItemName="TestOutput"/>
42 </MSBuild>
43
44 <TeamCityProgressMessage Text="Running Tests" />
45 <NUnitTeamCity Assemblies="@(TestOutput)" NUnitVersion="NUnit-2.5.9" />
46 </Target>
47
48 <Target Name="Build" DependsOnTargets="SetVersion">
49 <TeamCityProgressMessage Text="Building Projects" />
50 <MSBuild Projects="@(MainProjects)" Targets="Rebuild" Properties="Configuration=Release" />
51 </Target>
52
0e4ac6e @nberardi forgot I haven't setup the build server to run Cassandra yet
nberardi authored
53 <Target Name="Package" DependsOnTargets="Build">
144f612 @nberardi add msbuild file and move nuspec
nberardi authored
54 <TeamCityProgressMessage Text="Packaging NuGet" />
55
56 <ItemGroup>
57 <AssembliesToPackage Include="src\bin\**\$(AssemblyName).dll" />
52873d5 @nberardi upgraded to nuget 1.3 to pushlish symbols
nberardi authored
58 <AssembliesToPackage Include="src\bin\**\$(AssemblyName).pdb" />
144f612 @nberardi add msbuild file and move nuspec
nberardi authored
59 </ItemGroup>
60
61 <Copy SourceFiles="@(AssembliesToPackage)" DestinationFolder="$(PackageBuildPath)" />
62
e683641 @nberardi updated commandline instructions for nuget
nberardi authored
63 <Exec Command="$(NuGetExe) update -self" />
863611f @nberardi updated build script to push to symbol server
nberardi authored
64 <Exec Command="$(NuGetExe) pack -sym src/$(AssemblyName).csproj -o $(PackageBuildPath)" />
144f612 @nberardi add msbuild file and move nuspec
nberardi authored
65 </Target>
66
67 <Target Name="Deploy" DependsOnTargets="Package">
68 <TeamCityProgressMessage Text="Deploying NuGet" />
69
70 <Exec Command="$(NuGetExe) push $(NuPackage) $(package_key)" />
71 </Target>
72 </Project>
Something went wrong with that request. Please try again.