Skip to content

Commit

Permalink
Add build skip functionality for servicing builds (#2291)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagood authored Jan 29, 2020
1 parent 110af6e commit 7511628
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
27 changes: 27 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,34 @@
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
<NETCoreAppFrameworkVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppFrameworkVersion>
<NETCoreAppFramework>netcoreapp$(NETCoreAppFrameworkVersion)</NETCoreAppFramework>
<!--
The NETStandard.Library targeting pack uses this patch version, which does not match the
runtime's. After publishing a new version of the NETStandard targeting pack in a servicing
release, increase this number by one.
-->
<NETStandardPatchVersion>0</NETStandardPatchVersion>
</PropertyGroup>

<!--
Servicing build settings for Setup/Installer packages. Instructions:
* To enable a package build for the current patch release, set PatchVersion to match the current
patch version of that package. ("major.minor.patch".) This is normally the same as
PatchVersion above, but not always. Notably, NETStandard has its own patch version.
* When the PatchVersion property above is incremented at the beginning of the next servicing
release, all packages listed below automatically stop building because the property no longer
matches the metadata. (Do not delete the items!)
If the PatchVersion below is never changed from '0', the package will build in the 'master'
branch, and during a forked RTM release ("X.Y.0"). It will stop building for "X.Y.1" unless
manually enabled by updating the metadata.
-->
<ItemGroup>
<!-- Targeting packs are only patched in extreme cases. -->
<ProjectServicingConfiguration Include="Microsoft.NETCore.App.Ref" PatchVersion="0" />
<ProjectServicingConfiguration Include="NETStandard.Library.Ref" PatchVersion="0" />
</ItemGroup>

<PropertyGroup>
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20071.3</MicrosoftDotNetApiCompatVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<IsFrameworkPackage>true</IsFrameworkPackage>
<ShortFrameworkName>netstandard</ShortFrameworkName>
<ProductBrandPrefix>Microsoft .NET Standard</ProductBrandPrefix>

<ProductBandVersion>2.1</ProductBandVersion>
<ProductionVersion>$(ProductBandVersion).0</ProductionVersion>
</PropertyGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />

<PropertyGroup>
<ProductBandVersion>2.1</ProductBandVersion>
<PatchVersion>$(NETStandardPatchVersion)</PatchVersion>

<FrameworkListName>.NET Standard 2.1</FrameworkListName>
<FrameworkListTargetFrameworkIdentifier>.NETStandard</FrameworkListTargetFrameworkIdentifier>
<FrameworkListTargetFrameworkVersion>2.1</FrameworkListTargetFrameworkVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ public class NETCoreTests
[Fact]
public void NETCoreTargetingPackIsValid()
{
using (var tester = NuGetArtifactTester.Open(
using (var tester = NuGetArtifactTester.OpenOrNull(
dirs,
"Microsoft.NETCore.App.Ref"))
{
// Allow no targeting pack in case this is a servicing build.
// This condition should be tightened: https://github.com/dotnet/core-setup/issues/8830
if (tester == null)
{
return;
}

tester.IsTargetingPackForPlatform();
tester.HasOnlyTheseDataFiles(
"data/FrameworkList.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ public class NETStandardTests
[Fact]
public void NETStandardTargetingPackIsValid()
{
using (var tester = NuGetArtifactTester.Open(
using (var tester = NuGetArtifactTester.OpenOrNull(
dirs,
"NETStandard.Library.Ref"))
{
// Allow no targeting pack in case this is a servicing build.
// This condition should be tightened: https://github.com/dotnet/core-setup/issues/8830
if (tester == null)
{
return;
}

tester.HasOnlyTheseDataFiles(
"data/FrameworkList.xml",
"data/PackageOverrides.txt");
Expand Down

0 comments on commit 7511628

Please sign in to comment.