Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7f905c6483
Fetching contributors…

Cannot retrieve contributors at this time

189 lines (160 sloc) 10.703 kb
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildProjectDirectory)\Build.tasks" />
<PropertyGroup>
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
<ProjectRoot>$(MSBuildProjectDirectory)\..</ProjectRoot>
<ArtifactsDir>$(ProjectRoot)\artifacts\$(Configuration)</ArtifactsDir>
<TestResultsPath>$(ArtifactsDir)\TestResults</TestResultsPath>
<DocsPath>$(ArtifactsDir)\docs</DocsPath>
<NuGetToolsPath>$(ProjectRoot)\.nuget</NuGetToolsPath>
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<ToolsPath>$(ProjectRoot)\tools\</ToolsPath>
<XunitPath>$(ToolsPath)xunit\</XunitPath>
<DocuExePath>$(ToolsPath)docu\docu.exe</DocuExePath>
<ZipExe>$(ToolsPath)7za920\7za.exe</ZipExe>
<ScriptTempPath>$(ProjectRoot)\SignalR\bin\Scripts</ScriptTempPath>
<PrereleaseTagWithSeparator Condition="$(PrereleaseTag) != ''">-$(PrereleaseTag)</PrereleaseTagWithSeparator>
</PropertyGroup>
<PropertyGroup>
<MajorVersion>0</MajorVersion>
<MinorVersion>5</MinorVersion>
<PackageBuild>3</PackageBuild>
</PropertyGroup>
<PropertyGroup Condition="$(BUILD_NUMBER) != ''">
<!-- Ensure that we come up with a new version every 65535 years -->
<VersionStartYear>2012</VersionStartYear>
<!-- Build number is of the format (CurrentYear - VersionStartYear + 1)(2 digit month)(2 digit day) -->
<Build>$([MSBuild]::Add(1, $([MSBuild]::Subtract($([System.DateTime]::Now.Year), $(VersionStartYear)))))$([System.DateTime]::Now.ToString("MMdd"))</Build>
<Revision>$(BUILD_NUMBER)</Revision>
</PropertyGroup>
<PropertyGroup Condition="$(BUILD_NUMBER) == ''">
<Build>0</Build>
<Revision>0</Revision>
</PropertyGroup>
<PropertyGroup>
<Version>$(MajorVersion).$(MinorVersion).$(Revision).$(Build)</Version>
<PackageVersion>$(MajorVersion).$(MinorVersion).$(PackageBuild)$(PrereleaseTagWithSeparator)</PackageVersion>
<JsVersion>$(MajorVersion).$(MinorVersion).$(PackageBuild)$(PrereleaseTag)</JsVersion>
</PropertyGroup>
<ItemGroup>
<RegexTransform Include="$(ProjectRoot)\Common\CommonAssemblyInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\Common\CommonAssemblyInfo.cs">
<Find>AssemblyInformationalVersion\("\d+\.\d+\.\d+.\d+"\)</Find>
<ReplaceWith>AssemblyInformationalVersion("$(PackageVersion)")</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\**\AssemblyInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\SignalR.Client\Properties\VersionInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\SignalR.Client.JS\jquery.signalR.core.js">
<Find>SignalR JavaScript Library v\d+\.\d+\.\d+</Find>
<ReplaceWith>SignalR JavaScript Library v$(PackageVersion)</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\SignalR\Scripts\hubs.js">
<Find>SignalR JavaScript Library v\d+\.\d+</Find>
<ReplaceWith>SignalR JavaScript Library v$(PackageVersion)</ReplaceWith>
</RegexTransform>
</ItemGroup>
<Target Name="UpdateVersion" Condition="'$(BUILD_NUMBER)' != ''">
<RegexTransform Items="@(RegexTransform)" />
</Target>
<UsingTask AssemblyFile="$(XunitPath)xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit" />
<ItemGroup>
<TestProjects Include="$(ProjectRoot)\SignalR.Tests\bin\$(Configuration)\SignalR.Tests.dll" />
</ItemGroup>
<Target Name="Go" DependsOnTargets="UpdateVersion; Build; RunTests;">
</Target>
<Target Name="RunTests">
<xunit Assembly="%(TestProjects.FullPath)" Xml="$(TestResultsPath)\SignalR.Tests.XunitResults.xml" Verbose="true" />
</Target>
<Target Name="CreateOutputDir">
<RemoveDir Directories="$(ArtifactsDir)" />
<MakeDir Directories="$(ArtifactsDir)" Condition="!Exists('$(ArtifactsDir)')" />
<MakeDir Directories="$(TestResultsPath)" Condition="!Exists('$(TestResultsPath)')" />
<MakeDir Directories="$(DocsPath)" Condition="!Exists('$(DocsPath)')" />
</Target>
<Target Name="Build" DependsOnTargets="CreateOutputDir">
<MSBuild Projects="$(ProjectRoot)\SignalR.sln"
Targets="Build"
Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.WP7.sln"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')"
Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.Silverlight.sln"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets')"
Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.WinRT.sln"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\WindowsXaml')"
Properties="Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR45.sln"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\Web')"
Properties="Configuration=$(Configuration)" />
</Target>
<Target Name="BuildDocs" DependsOnTargets="CreateOutputDir">
<ItemGroup>
<DocProjects Include="$(ProjectRoot)\SignalR\bin\$(Configuration)\SignalR.dll" />
<DocProjects Include="$(ProjectRoot)\SignalR.Client\bin\$(Configuration)\SignalR.Client.dll" />
<DocProjects Include="$(ProjectRoot)\SignalR.Hosting.AspNet\bin\$(Configuration)\SignalR.Hosting.AspNet.dll" />
<DocProjects Include="$(ProjectRoot)\SignalR.Hosting.Self\bin\$(Configuration)\SignalR.Hosting.Self.dll" />
<DocProjects Include="$(ProjectRoot)\SignalR.Hosting.Owin\bin\$(Configuration)\SignalR.Hosting.Owin.dll" />
<DocProjects Include="$(ProjectRoot)\SignalR.Hosting.Common\bin\$(Configuration)\SignalR.Hosting.Common.dll" />
</ItemGroup>
<Exec Command="&quot;$(DocuExePath)&quot; @(DocProjects, ' ')" WorkingDirectory="$(DocsPath)" />
<Exec Command="&quot;$(ZipExe)&quot; a ..\..\docs.v$(Version).zip" WorkingDirectory="$(DocsPath)\output" />
</Target>
<Target Name="BuildPackages" DependsOnTargets="CreateOutputDir">
<ItemGroup>
<JsPackage Include="$(ProjectRoot)\SignalR.Client.JS\Properties\SignalR.Js.nuspec" />
<MetaPackage Include="$(ProjectRoot)\SignalR\Properties\SignalR.All.nuspec" />
<Projects Include="$(ProjectRoot)\SignalR\SignalR.csproj" />
<Projects Include="$(ProjectRoot)\SignalR.Hosting.AspNet\SignalR.Hosting.AspNet.csproj" />
<Projects Include="$(ProjectRoot)\SignalR.Client\SignalR.Client.csproj" />
<Projects Include="$(ProjectRoot)\SignalR.Hosting.Self\SignalR.Hosting.Self.csproj" />
<Projects Include="$(ProjectRoot)\SignalR.Hosting.Owin\SignalR.Hosting.Owin.csproj" />
<Projects Include="$(ProjectRoot)\SignalR.Hosting.Common\SignalR.Hosting.Common.csproj" />
<WinRTClient Include="$(ProjectRoot)\SignalR.Client.WinRT\bin\$(Configuration)\SignalR.Client.*"></WinRTClient>
</ItemGroup>
<!-- To workaround a bug in nuget -->
<MakeDir Directories="$(ProjectRoot)\SignalR.Client\bin\$(Configuration)\winrt" />
<Copy SourceFiles="%(WinRTClient.Identity)" DestinationFolder="$(ProjectRoot)\SignalR.Client\bin\$(Configuration)\winrt" />
<MSBuild Projects="%(Projects.Identity)"
Targets="Build"
Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
<!-- Only build WP7 and Silverlight projects if SDK's avaliable -->
<MSBuild Projects="$(ProjectRoot)\SignalR.Client.WP7\SignalR.Client.WP7.csproj"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')"
Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.Client.Silverlight\SignalR.Client.Silverlight.csproj"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0')"
Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
<MSBuild Projects="$(ProjectRoot)\SignalR.Client.Silverlight5\SignalR.Client.Silverlight5.csproj"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets')"
Properties="BuildPackage=true;Version=$(PackageVersion);PackageOutputDir=$(ArtifactsDir);Configuration=$(Configuration)" />
<RemoveDir Directories="$(ScriptTempPath)" />
<MakeDir Directories="$(ScriptTempPath)" />
<Copy SourceFiles="$(ProjectRoot)\SignalR.Client.JS\bin\jquery.signalR.js"
DestinationFiles="$(ScriptTempPath)\jquery.signalR-$(JsVersion).js" />
<Copy SourceFiles="$(ProjectRoot)\SignalR.Client.JS\bin\jquery.signalR.min.js"
DestinationFiles="$(ScriptTempPath)\jquery.signalR-$(JsVersion).min.js" />
<Exec Command="&quot;$(NuGetExePath)&quot; pack &quot;%(JsPackage.Identity)&quot; -o &quot;$(ArtifactsDir)&quot; -p Version=$(PackageVersion) -basePath &quot;$(ScriptTempPath)&quot;"
LogStandardErrorAsError="true" />
<Exec Command="&quot;$(NuGetExePath)&quot; pack &quot;%(MetaPackage.Identity)&quot; -o &quot;$(ArtifactsDir)&quot; -p Version=$(PackageVersion) -exclude **\*.cs"
LogStandardErrorAsError="true" />
</Target>
</Project>
Jump to Line
Something went wrong with that request. Please try again.