Skip to content

Commit 03f3540

Browse files
committed
Correct and centralize a couple of conditions
- add `$(IgnorePackageBaselines)` property
1 parent a4a4403 commit 03f3540

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

Directory.Build.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060

6161
<PropertyGroup Condition=" '$(IsPackable)' != 'false' AND '$(AspNetCorePatchVersion)' != '0' ">
6262
<!--
63-
For now at least, build entire repo to settle the infrastructure and ignore out-of-date package baselines. May
64-
revisit after aspnet/AspNetCore#12702 is complete.
63+
Build entire repo while we settle the infrastructure; ignore PatchConfig.props.
64+
Do _not_ do this when stabilizing versions.
6565
-->
6666
<IsPackageInThisPatch
67-
Condition="'$(IsPackageInThisPatch)' == '' AND '$(IsServicingBuild)' == 'true' AND '$(StabilizePackageVersion)' != 'true'">true</IsPackageInThisPatch>
67+
Condition="'$(IsPackageInThisPatch)' == '' AND '$(StabilizePackageVersion)' != 'true'">true</IsPackageInThisPatch>
6868
<IsPackageInThisPatch Condition="'$(IsPackageInThisPatch)' == ''">$(PackagesInPatch.Contains(' $(PackageId);'))</IsPackageInThisPatch>
6969
</PropertyGroup>
7070

eng/Versions.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
2727
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
2828
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
29+
<!--
30+
Until package baselines are updated (see aspnet/AspNetCore#12702), ignore them.
31+
Do _not_ do this when stabilizing versions.
32+
-->
33+
<IgnorePackageBaselines Condition=" '$(StabilizePackageVersion)' != 'true' ">true</IgnorePackageBaselines>
2934
<!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
3035
<IsServicingBuild Condition=" '$(PreReleaseVersionLabel)' == 'servicing' ">true</IsServicingBuild>
3136
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>

eng/targets/Packaging.targets

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
<Project>
22

3-
<!--
4-
For now at least, disable this check and ignore out-of-date package baselines.
5-
Revisit after aspnet/AspNetCore#12702 is complete.
6-
-->
73
<Target Name="EnsureBaselineIsUpdated"
8-
Condition="'$(IsServicingBuild)' == 'true' AND '$(StabilizePackageVersion)' != 'true' AND '$(AspNetCoreBaselineVersion)' != '$(PreviousAspNetCoreReleaseVersion)'"
4+
Condition="'$(IsServicingBuild)' == 'true' AND '$(IgnorePackageBaselines)' != 'true' AND '$(AspNetCoreBaselineVersion)' != '$(PreviousAspNetCoreReleaseVersion)'"
95
BeforeTargets="BeforeBuild">
106
<Error Text="The package baseline ($(AspNetCoreBaselineVersion)) is out of date with the latest release of this repo ($(PreviousAspNetCoreReleaseVersion)).
117
See $(RepoRoot)eng\tools\BaselineGenerator\README.md for instructions on updating this baseline." />

eng/targets/ResolveReferences.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
* when a project is a test or sample project
4646
We don't use project references between components in servicing builds between compontents to preserve the baseline as much as possible.
4747
-->
48-
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences>
48+
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IgnorePackageBaselines)' == 'true' ">true</UseProjectReferences>
49+
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences>
4950
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseProjectReferences>
5051
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' ">false</UseProjectReferences>
5152

0 commit comments

Comments
 (0)