mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-26 19:34:22 +08:00
Verify that packages have license data (#19543)
This commit is contained in:
parent
b4f2e3ad8c
commit
232b6b1273
@ -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"
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user