From 9d1e42a3d04b205c4f0749d587282611663c9eb3 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 12 Jul 2023 00:35:14 +0000 Subject: [PATCH 1/2] Check for pre-release packages --- tools/findMissingNotices.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/findMissingNotices.ps1 b/tools/findMissingNotices.ps1 index d1c43816b29..1c9612ed80b 100644 --- a/tools/findMissingNotices.ps1 +++ b/tools/findMissingNotices.ps1 @@ -6,7 +6,8 @@ # Requires the module dotnet.project.assets from the PowerShell Gallery authored by @TravisEz13 param( - [switch] $Fix + [switch] $Fix, + [switch] $IsRelease ) Import-Module dotnet.project.assets @@ -274,6 +275,17 @@ foreach ($runtime in "win7-x64", "linux-x64", "osx-x64", "alpine-x64", "win-arm" $newRegistrations = $registrations.Keys | Sort-Object | ForEach-Object { $registrations[$_] } +if ($IsStable) { + foreach ($registion in $newRegistrations) { + $name = $registion.Component.Name() + $version = $registion.Component.Version() + $developmentDependency = $registion.DevelopmentDependency + if ($version -match '-' -and !$developmentDependency) { + throw "Version $version of $name is preview. This is not allowed." + } + } +} + $count = $newRegistrations.Count $newJson = @{ Registrations = $newRegistrations From 2bd26cd06df3a2055b0301e0b9eb03a07754bb23 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 17 Jul 2023 10:00:04 -0700 Subject: [PATCH 2/2] Update tools/findMissingNotices.ps1 --- tools/findMissingNotices.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/findMissingNotices.ps1 b/tools/findMissingNotices.ps1 index 1c9612ed80b..0ea53c665b4 100644 --- a/tools/findMissingNotices.ps1 +++ b/tools/findMissingNotices.ps1 @@ -7,7 +7,7 @@ param( [switch] $Fix, - [switch] $IsRelease + [switch] $IsStable ) Import-Module dotnet.project.assets