Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

115 lines (98 sloc) 6.171 kB
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="RunAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildProjectDirectory)\Build.tasks" />
<PropertyGroup>
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
<ProjectRoot>$(MSBuildProjectDirectory)\..</ProjectRoot>
<ToolsPath>$(ProjectRoot)\tools\</ToolsPath>
<XunitPath>$(ToolsPath)xunit\</XunitPath>
<ArtifactsPath>$(ProjectRoot)\artifacts\$(Configuration)</ArtifactsPath>
<ServiceSiteTargetPath Condition="$(ServiceSiteTargetPath) == ''">$(ArtifactsPath)\KuduService</ServiceSiteTargetPath>
<ServiceSiteProject>$(ProjectRoot)\Kudu.Services.Web\Kudu.Services.Web.csproj</ServiceSiteProject>
<ClientSiteTargetPath Condition="$(ClientSiteTargetPath) == ''">$(ArtifactsPath)\KuduWeb</ClientSiteTargetPath>
<ClientSiteProject>$(ProjectRoot)\Kudu.Web\Kudu.Web.csproj</ClientSiteProject>
<TestResultsPath>$(ArtifactsPath)\TestResults</TestResultsPath>
<SetupTargetPath>$(ArtifactsPath)\msi</SetupTargetPath>
<SignedTargetPath>$(ArtifactsPath)\signed</SignedTargetPath>
</PropertyGroup>
<PropertyGroup>
<MajorVersion>0</MajorVersion>
<MinorVersion>6</MinorVersion>
<!-- 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>
<Version>$(MajorVersion).$(MinorVersion).$(Revision).$(Build)</Version>
</PropertyGroup>
<ItemGroup>
<RegexTransform Include="$(ProjectRoot)\Common\CommonAssemblyInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
<RegexTransform Include="$(ProjectRoot)\Kudu.Setup\Kudu.wxs">
<Find><![CDATA[KuduProductVersion = "\d+\.\d+\.\d+\.\d+"]]></Find>
<ReplaceWith><![CDATA[KuduProductVersion = "$(Version)"]]></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" />
<Target Name="RunAll" DependsOnTargets="UpdateVersion; Build; RunTests; BuildSites" />
<Target Name="CreateOutputPath">
<MakeDir Directories="$(ArtifactsPath)" Condition="!Exists('$(ArtifactsPath)')" />
<MakeDir Directories="$(TestResultsPath)" Condition="!Exists('$(TestResultsPath)')" />
</Target>
<Target Name="BuildSites">
<MSBuild Projects="$(ServiceSiteProject)"
Targets="pipelinePreDeployCopyAllFilesToOneFolder"
Properties="_PackageTempDir=$(ServiceSiteTargetPath);
AutoParameterizationWebConfigConnectionStrings=false;
SolutionDir=$(ProjectRoot)\;
MSBuildExtensionsPath32=$(ProjectRoot)\Kudu.Services.Web\msbuild"/>
<Exec Command="&quot;$(MSBuildProgramFiles32)\Git\bin\git.exe&quot; rev-parse HEAD > $(ServiceSiteTargetPath)\commit"
WorkingDirectory="$(ProjectRoot)" />
<Copy SourceFiles="$(ProjectRoot)\Kudu.Services.Web\bin\kudu.exe" DestinationFolder="$(ServiceSiteTargetPath)\bin" />
<MSBuild Projects="$(ClientSiteProject)"
Targets="pipelinePreDeployCopyAllFilesToOneFolder"
Properties="_PackageTempDir=$(ClientSiteTargetPath);
AutoParameterizationWebConfigConnectionStrings=false;
SolutionDir=$(ProjectRoot)\;
MSBuildExtensionsPath32=$(ProjectRoot)\Kudu.Services.Web\msbuild"/>
</Target>
<Target Name="RunTests" DependsOnTargets="CreateOutputPath">
<xunit Assembly="$(ProjectRoot)\Kudu.Core.Test\bin\$(Configuration)\Kudu.Core.Test.dll"
Xml="$(TestResultsPath)\Kudu.Core.Test.XunitResults.xml"
Verbose="true" />
</Target>
<Target Name="RunFunctionalTests" DependsOnTargets="CreateOutputPath">
<xunit Assembly="$(ProjectRoot)\Kudu.FunctionalTests\bin\$(Configuration)\Kudu.FunctionalTests.dll"
Xml="$(TestResultsPath)\Kudu.FunctionalTests.XunitResults.xml"
Verbose="true" />
</Target>
<Target Name="Build" DependsOnTargets="CreateOutputPath">
<MSBuild Projects="$(ProjectRoot)\kudu.sln"
Targets="Build"
Properties="Configuration=$(Configuration);
MSBuildExtensionsPath32=$(ProjectRoot)\Kudu.Services.Web\msbuild" />
</Target>
<Target Name="BuildSetup" DependsOnTargets="RunAll">
<MSBuild Projects="$(ProjectRoot)\Kudu.Setup.sln"
Targets="Build"
Properties="OutputPath=$(SetupTargetPath);
Configuration=$(Configuration);" />
</Target>
<Target Name="BuildSignedClient" Condition="$(KeyFile) != '' And Exists('$(KeyFile)')">
<ItemGroup>
<Projects Include="$(ProjectRoot)\Kudu.Contracts\Kudu.Contracts.csproj" />
<Projects Include="$(ProjectRoot)\Kudu.Client\Kudu.Client.csproj" />
</ItemGroup>
<MakeDir Directories="$(SignedTargetPath)" Condition="!Exists('$(SignedTargetPath)')" />
<Message Text="Using Keyfile $(KeyFile)" Importance="High" />
<MSBuild Projects="%(Projects.Identity)"
Targets="Rebuild"
Properties="Configuration=$(Configuration);KeyFile=$(KeyFile);OutputPath=$(SignedTargetPath)" />
</Target>
</Project>
Jump to Line
Something went wrong with that request. Please try again.