Skip to content

Commit

Permalink
get scope of 'all' work
Browse files Browse the repository at this point in the history
  • Loading branch information
yugangw-msft committed May 12, 2015
1 parent 435cd7e commit 4951ace
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 67 deletions.
62 changes: 13 additions & 49 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,18 @@
<CodeSign Condition=" '$(CodeSign)' == '' ">false</CodeSign>
<!--Set this true only if you want to test the code sign workflow locally-->
<DelaySign Condition =" '$(DelaySign)' == '' ">false</DelaySign>
<!-- 'Common': only build common; 'All': Both common and servies; "Authentication": Azure Authentication; 'full path to a library project': build that project -->
<!-- 'Common': only build common; 'All': all projects; "Authentication": Azure Authentication; 'folder name': build individual projects underneath -->
<Scope Condition=" '$(Scope)' == '' ">All</Scope>
<FxTargetList Condition=" '$(FxTargetList)' == '' and '$(Scope)' == 'Authentication' " >net45</FxTargetList>
<FxTargetList Condition=" '$(FxTargetList)' == '' and ('$(Scope)' == '' or '$(Scope)' == 'all' or '$(Scope)' == 'Common') ">portable;net40;net45</FxTargetList>
<!--If FxTargetList still has no value, it must be an individual maml package-->
<FxTargetList Condition=" '$(FxTargetList)' == '' ">portable;net40;net45</FxTargetList>
<FxTargetList>portable;net40;net45</FxTargetList>
<BuildSpecifiedLibrary Condition=" '$(Scope)' != 'Common' and '$(Scope)' != 'Authentication' and '$(Scope)' != 'All' ">true</BuildSpecifiedLibrary>
</PropertyGroup>

<ItemGroup>
<SpecifiedLibrary Include="$(LibrarySourceFolder)\$(Scope)\*.sln" Condition=" '$(BuildSpecifiedLibrary)' == 'true' " />
<LibrariesToBuild Include="$(LibrarySourceFolder)\$(Scope)\*.sln" Condition=" '$(Scope)' != 'all' " />
<!--Exclude data plane projects which are managed by parnter service team individually-->
<LibrariesToBuild Include="$(LibrarySourceFolder)\**\*.sln"
Exclude="$(LibrarySourceFolder)\HDInsight\**\*.sln;$(LibrarySourceFolder)\KeyVault\**\*.sln"
Condition=" '$(Scope)' == 'all' " />
<LibraryFxTargetList Include="$(FxTargetList)" />
</ItemGroup>

Expand Down Expand Up @@ -107,49 +108,19 @@
<CallTarget Targets="BuildMsBuildTask" />
<CallTarget Targets="BuildServerPreparation" Condition=" '$(CodeSign)' == 'true' " />
<!--The solution contains configurations for each platform such as Net40-Debug, Net45-Release, etc
So when invoke msbuild, feed the right configuration name-->
<MSBuild Projects="$(CommonSolution)"
So when invoke msbuild, feed the right configuration name-->
<MSBuild Projects="@(LibrariesToBuild)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(Scope)' == 'Common' or '$(Scope)' == 'All' " />

<MSBuild Projects="$(AuthenticationSolution)"
Properties="Configuration=Net45-$(Configuration);Platform=Any CPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(Scope)' == 'Authentication' or '$(Scope)' == 'All' " />

<MSBuild Projects="$(ManagementLibrariesSolution)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(Scope)' == 'All' " />

<MSBuild Projects="@(SpecifiedLibrary)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(BuildSpecifiedLibrary)' == 'true' " />
Targets="Build" />

<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />

</Target>

<Target Name="Clean" DependsOnTargets="RestoreNugetPackages">

<MSBuild Projects="$(CommonSolution)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU"
Targets="Clean"
Condition=" '$(Scope)' == 'Common' or '$(Scope)' == 'All' "/>
<MSBuild Projects="$(AuthenticationSolution)"
Properties="Configuration=Net45-$(Configuration);Platform=Any CPU"
Targets="Clean"
Condition=" '$(Scope)' == 'Authentication' or '$(Scope)' == 'All' "/>
<MSBuild Projects="$(ManagementLibrariesSolution)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU"
Targets="Clean"
Condition=" '$(Scope)' == 'All' "/>
<MSBuild Projects="@(SpecifiedLibrary)"
<MSBuild Projects="@(LibrariesToBuild)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU"
Targets="Clean"
Condition=" '$(BuildSpecifiedLibrary)' == 'true' "/>
Targets="Clean"/>

<RemoveDir Directories="$(BinariesFolder)" />
</Target>
Expand Down Expand Up @@ -251,14 +222,7 @@
<PropertyGroup>
<NuGetRestoreConfigSwitch>-PackagesDirectory $(LibraryNugetPackageFolder)</NuGetRestoreConfigSwitch>
</PropertyGroup>
<Exec Command="$(NuGetCommand) restore $(CommonSolution) $(NuGetRestoreConfigSwitch)"
Condition=" '$(Scope)' == 'Common' or '$(Scope)' == 'All' " />
<Exec Command="$(NuGetCommand) restore $(AuthenticationSolution) $(NuGetRestoreConfigSwitch)"
Condition=" '$(Scope)' == 'Authentication' " />
<Exec Command="$(NuGetCommand) restore $(ManagementLibrariesSolution) $(NuGetRestoreConfigSwitch)"
Condition=" '$(Scope)' == 'All' " />
<Exec Command="$(NuGetCommand) restore @(SpecifiedLibrary) $(NuGetRestoreConfigSwitch)"
Condition=" '$(BuildSpecifiedLibrary)' == 'true' " />
<Exec Command="$(NuGetCommand) restore %(LibrariesToBuild.Identity) $(NuGetRestoreConfigSwitch)"/>
<Exec Command="$(NuGetCommand) install xunit.runner.console -Version 2.0.0 -o $(LibraryNugetPackageFolder)" />
</Target>

Expand Down
16 changes: 14 additions & 2 deletions src/Authentication/Authentication.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Authentication", "Common.Authentication\Common.Authentication.csproj", "{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Authentication.Test", "Common.Authentication.Tests\Common.Authentication.Tests.csproj", "{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Authentication.Tests", "Common.Authentication.Tests\Common.Authentication.Tests.csproj", "{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Net40-Debug|Any CPU = Net40-Debug|Any CPU
Net40-Release|Any CPU = Net40-Release|Any CPU
Net45-Debug|Any CPU = Net45-Debug|Any CPU
Net45-Release|Any CPU = Net45-Release|Any CPU
Portable-Debug|Any CPU = Portable-Debug|Any CPU
Portable-Release|Any CPU = Portable-Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Net40-Debug|Any CPU.ActiveCfg = Net45-Release|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Net40-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Net45-Release|Any CPU.Build.0 = Net45-Release|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Portable-Debug|Any CPU.ActiveCfg = Net45-Release|Any CPU
{B95C489C-8CB7-4DCF-8D5F-B9AEBDBBAF89}.Portable-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Net40-Debug|Any CPU.ActiveCfg = Net45-Release|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Net40-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Net45-Debug|Any CPU.ActiveCfg = Net45-Debug|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Net45-Debug|Any CPU.Build.0 = Net45-Debug|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Net45-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Net45-Release|Any CPU.Build.0 = Net45-Release|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Portable-Debug|Any CPU.ActiveCfg = Net45-Release|Any CPU
{C2CF99A2-D35E-4AED-AFB9-C26960AF1D0D}.Portable-Release|Any CPU.ActiveCfg = Net45-Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion src/KeyVault/NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<settings>
<repositoryPath>..\..\..\packages</repositoryPath>
<repositoryPath>..\..\packages</repositoryPath>
</settings>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--
Microsoft.Azure.Management.RecoveryServices
-->
<SdkNuGetPackage Include="Microsoft.Azure.Management.RecoveryServices">
<SdkNuGetPackage Include="Microsoft.WindowsAzure.Management.RecoveryServices">
<PackageVersion>0.6.0-preview</PackageVersion>
<Folder>$(MSBuildThisFileDirectory)</Folder>
</SdkNuGetPackage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dependencies>
</metadata>
<files>
<file src="SiteRecoveryManagement\**\*.cs" target="src" />
<file src="ServiceManagement\SiteRecovery\SiteRecoveryManagement\**\*.cs" target="src" />
<file src="..\binaries\portable\Microsoft.WindowsAzure.Management.SiteRecovery.dll" target="lib\portable-net45+wp8+wpa81+win" />
<file src="..\binaries\portable\Microsoft.WindowsAzure.Management.SiteRecovery.pdb" target="lib\portable-net45+wp8+wpa81+win" />
<file src="..\binaries\portable\Microsoft.WindowsAzure.Management.SiteRecovery.xml" target="lib\portable-net45+wp8+wpa81+win" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
<ItemGroup>
<Compile Include="Customizations\WebSiteCloudException.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="..\..\..\..\tools\Library.Settings.targets" />
<Import Project="$(LibraryToolsFolder)\Test.Dependencies.target" />
<ItemGroup>
<Compile Include="RecordedDelegatingHandler.cs" />
<Compile Include="ScenarioTests\HttpPayload.Designer.cs">
<AutoGen>True</AutoGen>
Expand Down
18 changes: 9 additions & 9 deletions tools/nuget.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<BaselineReleaseNotes>PREVIEW RELEASE</BaselineReleaseNotes>
</PropertyGroup>

<Import Project="$(LibrarySourceFolder)\Common\**\*.nuget.proj"
Condition=" '$(Scope)' == 'Common' "/>
<Import Project="$(LibrarySourceFolder)\Authentication\**\*.nuget.proj"
Condition=" '$(Scope)' == 'Authentication' "/>
<!--TODO: Filter away the unwanted one-->
<Import Project="$(LibrarySourceFolder)\**\*.nuget.proj"
Condition=" '$(Scope)' == 'All' "/>
<!--TODO: make sure keyvault works-->
<Import Project="$(LibrarySourceFolder)\$(Scope)\**\*.nuget.proj"
Condition=" '$(BuildSpecifiedLibrary)' == 'true' " />
Condition=" '$(Scope)' != 'all' "/>
<Import Project="$(LibrarySourceFolder)\ResourceManagement\**\*.nuget.proj"
Condition=" '$(Scope)' == 'all' "/>
<Import Project="$(LibrarySourceFolder)\ServiceManagement\**\*.nuget.proj"
Condition=" '$(Scope)' == 'all' "/>
<Import Project="$(LibrarySourceFolder)\Common\**\*.nuget.proj"
Condition=" '$(Scope)' == 'all' "/>
<Import Project="$(LibrarySourceFolder)\Authentication\**\*.nuget.proj"
Condition=" '$(Scope)' == 'all' "/>

<PropertyGroup>
<NuGetVerbosity>normal</NuGetVerbosity>
Expand Down

0 comments on commit 4951ace

Please sign in to comment.