Skip to content

Commit

Permalink
Set correct property for non-conformant mgmt projects (Azure#19946)
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard authored Mar 30, 2021
1 parent 6029b84 commit d2788e5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
3 changes: 3 additions & 0 deletions eng/pipelines/mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ pr:
- '*-preview'
paths:
include:
- mgmt.proj
- eng/pipelines/mgmt.yml
- eng/mgmt
- sdk/mgmtcommon
- sdk/advisor/Microsoft.Azure.Management.Advisor
- sdk/alertsmanagement/Microsoft.Azure.Management.AlertsManagement
- sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices
Expand Down
4 changes: 4 additions & 0 deletions eng/scripts/Update-Mgmt-Yml.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ $PrIncludes = New-Object "System.Collections.Generic.List[String]"

$MgmtDirs = Get-ChildItem -Path "$PackagesPath" -Directory -Recurse -Depth 1 | Where-Object { $_.FullName -match "(.Microsoft\.Azure(Stack)?\.Management.)|(.\\mgmt)" }

$Includes.Add('mgmt.proj')
$Includes.Add('eng/pipelines/mgmt.yml')
$Includes.Add('eng/mgmt')
$Includes.Add('sdk/mgmtcommon')

# Add Each client path to the exclude list
foreach ($Item in $MgmtDirs) {
$IncludePath = $Item.FullName.Substring($Item.FullName.IndexOf("sdk\"))
Expand Down
3 changes: 3 additions & 0 deletions mgmt.proj
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsLegacyMgmtProject>true</IsLegacyMgmtProject>
</PropertyGroup>
<Import Project="Directory.Build.props" />
<Import Project="Directory.Build.targets" />
</Project>
6 changes: 6 additions & 0 deletions sdk/azurestack/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsLegacyMgmtProject Condition="'$(IsLegacyMgmtProject)' == ''">true</IsLegacyMgmtProject>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
</Project>
6 changes: 2 additions & 4 deletions sdk/mgmtcommon/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsLegacyMgmtProject Condition="'$(IsLegacyMgmtProject)' == ''">true</IsLegacyMgmtProject>
</PropertyGroup>
<PropertyGroup>
<IsLegacyMgmtProject>true</IsLegacyMgmtProject>
<SkipBaselineTargetFxMatching>true</SkipBaselineTargetFxMatching>
</PropertyGroup>
<Import Project="..\Directory.Build.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
</Project>

0 comments on commit d2788e5

Please sign in to comment.