Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

107 lines (91 sloc) 5.839 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>$(ProjectRoot)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>7</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]::UtcNow.Year), $(VersionStartYear)))))$([System.DateTime]::UtcNow.ToString("MMdd"))</Build>
<Revision>$(BUILD_NUMBER)</Revision>
<Version>$(MajorVersion).$(MinorVersion).$(Build).$(Revision)</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>
<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)\;"/>
<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)\;"/>
</Target>
<Target Name="RunTests" DependsOnTargets="CreateOutputPath">
<MsBuild Projects="Build.xunit.targets" Targets="_RunTests"
Properties="Assembly=$(ProjectRoot)\Kudu.Core.Test\bin\$(Configuration)\Kudu.Core.Test.dll;Xml=$(TestResultsPath)\Kudu.Core.Test.XunitResults.xml" />
</Target>
<Target Name="RunFunctionalTests" DependsOnTargets="CreateOutputPath">
<MsBuild Projects="Build.xunit.targets" Targets="_RunTests"
Properties="Assembly=$(ProjectRoot)\Kudu.FunctionalTests\bin\$(Configuration)\Kudu.FunctionalTests.dll;Xml=$(TestResultsPath)\Kudu.FunctionalTests.XunitResults.xml" />
</Target>
<Target Name="Build" DependsOnTargets="CreateOutputPath">
<MSBuild Projects="$(ProjectRoot)\kudu.sln"
Targets="Build"
Properties="Configuration=$(Configuration);" />
</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.