Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 8912 (Azure#30985)
Browse files Browse the repository at this point in the history
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#8912 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
  • Loading branch information
azure-sdk and hallipr authored Sep 3, 2024
1 parent 28d9737 commit 202822c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eng/common/scripts/Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
foreach ($pkg in $allPackageProperties)
{
$pkgDirectory = Resolve-Path "$($pkg.DirectoryPath)"
$lookupKey = ($pkg.DirectoryPath).Replace($RepoRoot, "").SubString(1)
$lookupKey = ($pkg.DirectoryPath).Replace($RepoRoot, "").TrimStart('\/')
$lookup[$lookupKey] = $pkg

foreach ($file in $targetedFiles)
Expand All @@ -132,12 +132,15 @@ function Get-PrPkgProperties([string]$InputDiffJson) {
if ($pkg.AdditionalValidationPackages) {
$additionalValidationPackages += $pkg.AdditionalValidationPackages
}

# avoid adding the same package multiple times
break
}
}
}

foreach ($addition in $additionalValidationPackages) {
$key = $addition.Replace($RepoRoot, "").SubString(1)
$key = $addition.Replace($RepoRoot, "").TrimStart('\/')

if ($lookup[$key]) {
$packagesWithChanges += $lookup[$key]
Expand Down

0 comments on commit 202822c

Please sign in to comment.