Skip to content

Commit 8e3d015

Browse files
azure-sdkscbeddbenbp
authored
Sync eng/common directory with azure-sdk-tools for PR 9635 (Azure#39205)
* ensure that packages that come back from AdditionalValidationPackages are NOT counted as 'includedForValidation: true' if they also exist in the original 'these packages changed' set Co-authored-by: Ben Broderick Phillips <[email protected]> --------- Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: Scott Beddall <[email protected]> Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent d2cf143 commit 8e3d015

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

eng/common/scripts/Package-Properties.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,17 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
187187
}
188188
}
189189

190+
$existingPackageNames = @($packagesWithChanges | ForEach-Object { $_.Name })
190191
foreach ($addition in $additionalValidationPackages) {
191192
$key = $addition.Replace($RepoRoot, "").TrimStart('\/')
192193

193194
if ($lookup[$key]) {
194-
$lookup[$key].IncludedForValidation = $true
195-
$packagesWithChanges += $lookup[$key]
195+
$pkg = $lookup[$key]
196+
197+
if ($pkg.Name -notin $existingPackageNames) {
198+
$pkg.IncludedForValidation = $true
199+
$packagesWithChanges += $pkg
200+
}
196201
}
197202
}
198203

0 commit comments

Comments
 (0)