Sync eng/common directory with azure-sdk-tools for PR 8878 (#7937)
* Apply a few changes to Get-PRPackageProperties to make it more customizable for our users. Remove wonky gap + extra spacing that should pass the patch application process now that we've manually aligned common.ps1 * account for feedback -- rename CanaryPackages to AdditionalValidationPackages * dependentPackagesforInclusion -> additionalValidationPackages --------- Co-authored-by: Scott Beddall <scbedd@microsoft.com>
This commit is contained in:
Родитель
3425e7846b
Коммит
28115def5e
|
@ -15,7 +15,7 @@ class PackageProps
|
|||
[boolean]$IsNewSdk
|
||||
[string]$ArtifactName
|
||||
[string]$ReleaseStatus
|
||||
[string[]]$DependentPackages
|
||||
[string[]]$AdditionalValidationPackages
|
||||
|
||||
PackageProps([string]$name, [string]$version, [string]$directoryPath, [string]$serviceDirectory)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
|
|||
$diff = Get-Content $InputDiffJson | ConvertFrom-Json
|
||||
$targetedFiles = $diff.ChangedFiles
|
||||
|
||||
$dependentPackagesForInclusion = @()
|
||||
$additionalValidationPackages = @()
|
||||
$lookup = @{}
|
||||
|
||||
foreach ($pkg in $allPackageProperties)
|
||||
|
@ -129,19 +129,26 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
|
|||
if ($shouldInclude) {
|
||||
$packagesWithChanges += $pkg
|
||||
|
||||
if ($pkg.DependentPackages) {
|
||||
$dependentPackagesForInclusion += $pkg.DependentPackages
|
||||
if ($pkg.AdditionalValidationPackages) {
|
||||
$additionalValidationPackages += $pkg.AdditionalValidationPackages
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($addition in $dependentPackagesForInclusion) {
|
||||
if ($lookup[$addition]) {
|
||||
$packagesWithChanges += $lookup[$addition]
|
||||
foreach ($addition in $additionalValidationPackages) {
|
||||
$key = $addition.Replace($RepoRoot, "").SubString(1)
|
||||
|
||||
if ($lookup[$key]) {
|
||||
$packagesWithChanges += $lookup[$key]
|
||||
}
|
||||
}
|
||||
|
||||
if ($AdditionalValidationPackagesFromPackageSetFn -and (Test-Path "Function:$AdditionalValidationPackagesFromPackageSetFn"))
|
||||
{
|
||||
$packagesWithChanges += &$AdditionalValidationPackagesFromPackageSetFn $packagesWithChanges $diff
|
||||
}
|
||||
|
||||
return $packagesWithChanges
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ $GetEmitterAdditionalOptionsFn = "Get-${Language}-EmitterAdditionalOptions"
|
|||
$GetEmitterNameFn = "Get-${Language}-EmitterName"
|
||||
$GetDirectoriesForGenerationFn = "Get-${Language}-DirectoriesForGeneration"
|
||||
$UpdateGeneratedSdksFn = "Update-${Language}-GeneratedSdks"
|
||||
$IsApiviewStatusCheckRequiredFn = "Get-${Language}-ApiviewStatusCheckRequirement"
|
||||
$IsApiviewStatusCheckRequiredFn = "Get-${Language}-ApiviewStatusCheckRequirement"
|
||||
$AdditionalValidationPackagesFromPackageSetFn = "Get-${Language}-AdditionalValidationPackagesFromPackageSet"
|
||||
|
||||
# Expected to be set in eng/scripts/docs/Docs-Onboarding.ps1
|
||||
$SetDocsPackageOnboarding = "Set-${Language}-DocsPackageOnboarding"
|
||||
|
|
Загрузка…
Ссылка в новой задаче