Verify that packages have license data (#19543)

This commit is contained in:
Travis Plunk 2023-04-21 11:50:49 -07:00 committed by GitHub
parent b4f2e3ad8c
commit 232b6b1273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -7,6 +7,9 @@ param(
[parameter(Mandatory = $true, ParameterSetName='Test')]
[switch]
$Test,
[parameter(Mandatory = $true, ParameterSetName='TestAndHarvest')]
[switch]
$TestAndHarvest,
[switch]
$ForceModuleReload
)
@ -35,9 +38,10 @@ $needHarvest = $fullList | Where-Object { !$_.harvested }
Write-Verbose "Full List count: $($fullList.Count)" -Verbose
Write-Verbose "Need harvest: $($needHarvest.Count)" -Verbose
if ($Harvest) {
if ($Harvest -or $TestAndHarvest) {
$needHarvest | select-object -ExpandProperty coordinates | Start-ClearlyDefinedHarvest
} elseif ($Test) {
}
if ($Test -or $TestAndHarvest) {
if($needHarvest.Count -gt 0) {
$needHarvest | Format-List | Out-String -Width 9999 | Write-Verbose -Verbose
throw "There are $($needHarvest.Count) packages that need to be harvested"

View File

@ -46,6 +46,10 @@ jobs:
inputs:
sourceScanPath: '$(Build.SourcesDirectory)\tools'
- pwsh: |
./tools/clearlyDefined/ClearlyDefined.ps1 -TestAndHarvest
displayName: Verify that packages have license data
- task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0
displayName: 'NOTICE File Generator'
inputs: