Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

194 lines (174 sloc) 7.714 kB
<?xml version="1.0" encoding="utf-8"?>
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0"
DefaultTargets="ForceRestorePackages;Clean;BuildDebug;BuildRelease;BuildSetupDebug">
<!-- Define build properties -->
<PropertyGroup>
<ManagementCmdletBinDirectory>.\src\ServiceManagement\Services\Commands\bin</ManagementCmdletBinDirectory>
<ManagementTestDirectory>.\src\ServiceManagement\Services\Commands.Test\bin</ManagementTestDirectory>
<ManagementTestAssemblyName>Microsoft.WindowsAzure.Commands.Test.dll</ManagementTestAssemblyName>
<SetupDirectory>.\setup\build</SetupDirectory>
<PublishDirectory>.\src\Publish</PublishDirectory>
<PackageDirectory>.\src\Package</PackageDirectory>
<BuildOutputDirectory>$(PublishDirectory)\Build</BuildOutputDirectory>
<SetupOutputDirectory>$(PublishDirectory)\Setup</SetupOutputDirectory>
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
<DebugBuildConfig>Configuration=Debug;Platform=Any CPU</DebugBuildConfig>
<ReleaseBuildConfig>Configuration=Release;Platform=Any CPU</ReleaseBuildConfig>
</PropertyGroup>
<ItemGroup>
<AzurePowerShellSln Include=".\src\AzurePowerShell.sln" />
<SetupSln Include=".\setup\azurepowershell.sln" />
</ItemGroup>
<UsingTask
AssemblyFile="$(MSBuildProjectDirectory)\src\packages\xunit.1.9.2\lib\net20\xunit.runner.msbuild.dll"
TaskName="Xunit.Runner.MSBuild.xunit" />
<!-- Clean the build in all configurations -->
<Target Name="Clean">
<!-- Clean the solutions -->
<Message Importance="high" Text="Cleaning Cmdlets..." ContinueOnError="false" />
<MSBuild
Projects="@(AzurePowerShellSln)"
Targets="Clean"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(AzurePowerShellSln)"
Targets="Clean"
Properties="$(ReleaseBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Clean"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
<!-- Delete the publish files -->
<Message Importance="high" Text="Cleaning publish files..." ContinueOnError="false" />
<ItemGroup>
<PublishFiles Include="$(PublishDirectory)\**\*.*" />
</ItemGroup>
<Delete
Files="@(PublishFiles)"
ContinueOnError="false" />
<RemoveDir
Directories="$(PublishDirectory)"
ContinueOnError="false" />
<!-- Delete the package files -->
<Message Importance="high" Text="Cleaning package files..." ContinueOnError="false" />
<ItemGroup>
<PackageFiles Include="$(PackageDirectory)\**\*.*" />
</ItemGroup>
<Delete
Files="@(PackageFiles)"
ContinueOnError="false" />
<RemoveDir
Directories="$(PackageDirectory)"
ContinueOnError="false" />
</Target>
<!--
Force nuget package restore so that packages that include .targets files
don't need to be checked into source control.
-->
<Target Name="ForceRestorePackages">
<PropertyGroup>
<NuGetCommand>$(MSBuildProjectDirectory)\src\.nuget\NuGet.exe</NuGetCommand>
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
</PropertyGroup>
<ItemGroup>
<NuGetCache Include="$(LOCALAPPDATA)\NuGet\Cache\*.nupkg"/>
</ItemGroup>
<!-- Delete NuGet cache-->
<Delete Files="@(NuGetCache)" />
<!-- Create config for user name and password for private feed access -->
<Delete Files="$(NuGetRestoreConfigFile)" />
<WriteLinesToFile File="$(NuGetRestoreConfigFile)" Lines="&lt;configuration&gt;&lt;/configuration&gt;" Overwrite="true" Encoding="UTF-8" />
<Exec Command="$(NuGetCommand) sources add -Name AzureSdkInternal -Source &quot;https://www.myget.org/F/azure-sdk-internal/&quot; $(NuGetRestoreConfigSwitch)" />
<!-- Restore packages -->
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\AzurePowerShell.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="ErrorAndContinue" />
<!-- delete config file, don't want to leave passwords hanging around on the build server file system -->
<Delete Files="$(NuGetRestoreConfigFile)" />
</Target>
<!-- Build all flavors of the Cmdlets -->
<Target Name="BuildCmdlets" DependsOnTargets="ForceRestorePackages">
<Message Importance="high" Text="Building Cmdlets..." />
<MSBuild
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
<MSBuild
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(ReleaseBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Setup -->
<Target Name="BuildSetupDebug">
<Message
Importance="high"
Text="Building Setup..."
ContinueOnError="false" />
<Message
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Setup -->
<Target Name="BuildSetupRelease">
<Message
Importance="high"
Text="Building Setup..."
ContinueOnError="false" />
<Message
Importance="high"
Text="You are required to have installed the WiX Toolset at http://wix.codeplex.com/releases/view/115492 (Wix38.msi)"
ContinueOnError="false" />
<MSBuild
Projects="@(SetupSln)"
Targets="Build"
Properties="$(ReleaseBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Cmdlets and Setup in all configurations -->
<Target Name="Build" DependsOnTargets="BuildCmdlets;BuildSetupRelease" />
<!-- Do everything possible -->
<Target
Name="Full"
DependsOnTargets="ForceRestorePackages;Clean;BuildDebug;BuildRelease;Test;BuildSetupDebug;BuildSetupRelease" />
<!-- Build the Cmdlets in Release configuration -->
<Target Name="BuildRelease" DependsOnTargets="ForceRestorePackages">
<Message Importance="high" Text="Building Cmdlets in Release config..." />
<MSBuild
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(ReleaseBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Build the Cmdlets in Debug configuration -->
<Target Name="BuildDebug" DependsOnTargets="ForceRestorePackages">
<Message Importance="high" Text="Building Cmdlets in Debug config..." />
<MSBuild
Projects="@(AzurePowerShellSln)"
Targets="Build"
Properties="$(DebugBuildConfig)"
ContinueOnError="false" />
</Target>
<!-- Note: all testing related target should go to 'AzurePowershell.test.targets' file except the one used by CI run -->
<Import Project="$(MSBuildThisFileDirectory)AzurePowershell.test.targets"/>
<!-- Run checkin tests for each pull request -->
<Target Name="Test" DependsOnTargets="BuildDebug;BeforeRunTests">
<Message Importance="high" Text="Running check in tests..." />
<CallTarget Targets="TestManagement; TestHDInsight; TestManagedCache; TestServiceManagement; TestSqlDatabase; TestStorage; TestResourceManager; MockedScenarioTests" />
</Target>
<!-- Run Full switch with scenario tests -->
<Target
Name="FullWithScenarioTests"
DependsOnTargets="ForceRestorePackages;Clean;BuildDebug;BuildRelease;Test;BuildSetupDebug;BuildSetupRelease;RunOneSDKCIT" />
</Project>
Jump to Line
Something went wrong with that request. Please try again.