Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 3077484

Browse files
authored
Merge pull request #17323 from dotnet/wesh/FixIdentityPackageBuild
Fix identity package filtering
2 parents a8d07c8 + 41efe17 commit 3077484

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/.nuget/dir.traversal.targets

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,28 @@
33

44
<Import Project="$(MSBuildThisFileDirectory)..\..\dir.traversal.targets" />
55

6-
<PropertyGroup Condition="'$(OfficialBuildId)' != ''">
7-
<!-- During an official build, only build identity packages in the AllConfigurations build -->
8-
<BuildIdentityPackage Condition="'$(BuildIdentityPackage)' == '' AND '$(OS)' == 'Windows_NT' AND '$(BuildArch)' == 'x64'">true</BuildIdentityPackage>
6+
<PropertyGroup Condition="'$(BuildIdentityPackage)' == ''">
7+
<BuildIdentityPackage>true</BuildIdentityPackage>
8+
9+
<!-- Used to determine if we should build some packages only once across multiple official build legs.
10+
For offline builds we still set OfficialBuildId but we need to build all the packages for a single
11+
leg only, so we also take DotNetBuildOffline into account. -->
12+
<BuildingAnOfficialBuildLeg Condition="'$(OfficialBuildId)' != '' AND '$(DotNetBuildOffline)' != 'true'">true</BuildingAnOfficialBuildLeg>
13+
14+
<!-- During an official build, only build identity packages on windows x64 legs -->
15+
<BuildIdentityPackage Condition="'$(BuildingAnOfficialBuildLeg)' == 'true' AND ('$(OS)' != 'Windows_NT' OR '$(BuildArch)' != 'x64')">false</BuildIdentityPackage>
916
</PropertyGroup>
1017

1118
<Target Name="FilterProjects" BeforeTargets="Build">
1219
<Error Condition="'$(PackageRID)' == ''" Text="'PackageRID' property must be specified."/>
1320

1421
<!-- Only build packages for current RID or non-RID-specific -->
15-
<ItemGroup Condition="$(BuildIdentityPackage)!='true'">
22+
<ItemGroup>
1623
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(PackageRID)'" />
1724
</ItemGroup>
1825

19-
<ItemGroup Condition="$(BuildIdentityPackage)=='true'" >
20-
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(PackageRID)' OR '%(Project.PackageTargetRuntime)' == ''" />
26+
<ItemGroup Condition="'$(BuildIdentityPackage)' == 'true'">
27+
<_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == ''" />
2128
</ItemGroup>
2229

2330
<ItemGroup>

0 commit comments

Comments
 (0)