Correct and centralize a couple of conditions

- add `$(IgnorePackageBaselines)` property
This commit is contained in:
Doug Bunting 2019-09-24 20:04:57 -07:00
parent fcad3da558
commit 8bfb2a77bf
No known key found for this signature in database
GPG Key ID: EE41520987982C03
4 changed files with 11 additions and 9 deletions

View File

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

View File

@ -26,6 +26,11 @@
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion> <AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
<!-- Additional assembly attributes are already configured to include the source revision ID. --> <!-- Additional assembly attributes are already configured to include the source revision ID. -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<!--
Until package baselines are updated (see aspnet/AspNetCore#12702), ignore them.
Do _not_ do this when stabilizing versions.
-->
<IgnorePackageBaselines Condition=" '$(StabilizePackageVersion)' != 'true' ">true</IgnorePackageBaselines>
<!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. --> <!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
<IsServicingBuild Condition=" '$(PreReleaseVersionLabel)' == 'servicing' ">true</IsServicingBuild> <IsServicingBuild Condition=" '$(PreReleaseVersionLabel)' == 'servicing' ">true</IsServicingBuild>
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix> <VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>

View File

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

View File

@ -45,7 +45,8 @@
* when a project is a test or sample project * when a project is a test or sample project
We don't use project references between components in servicing builds between compontents to preserve the baseline as much as possible. We don't use project references between components in servicing builds between compontents to preserve the baseline as much as possible.
--> -->
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences> <UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IgnorePackageBaselines)' == 'true' ">true</UseProjectReferences>
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsServicingBuild)' != 'true' ">true</UseProjectReferences>
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseProjectReferences> <UseProjectReferences Condition=" '$(UseProjectReferences)' == '' AND '$(IsImplementationProject)' != 'true' ">true</UseProjectReferences>
<UseProjectReferences Condition=" '$(UseProjectReferences)' == '' ">false</UseProjectReferences> <UseProjectReferences Condition=" '$(UseProjectReferences)' == '' ">false</UseProjectReferences>