Sync eng/common directory with azure-sdk-tools for PR 8879 (#30893)

Sync eng/common directory with azure-sdk-tools for PR
https://github.com/Azure/azure-sdk-tools/pull/8879 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>
This commit is contained in:
Azure SDK Bot 2024-08-23 17:17:29 -07:00 коммит произвёл GitHub
Родитель 0a7913a414
Коммит 43e8e1bd38
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 53 добавлений и 46 удалений

Просмотреть файл

@ -99,20 +99,33 @@ $exportedPaths = @{}
$allPackageProperties = @()
if ($prDiff) {
Write-Host "Getting package properties for PR diff file: $prDiff"
$allPackageProperties = Get-PrPkgProperties $prDiff
if (!$allPackageProperties) {
Write-Host "No packages found matching PR diff file $prDiff"
Write-Host "Setting NoPackagesChanged variable to true"
Write-Host "##vso[task.setvariable variable=NoPackagesChanged]true"
exit 0
}
}
else {
Write-Host "Getting package properties for service directory: $serviceDirectory"
$allPackageProperties = Get-AllPkgProperties $serviceDirectory
if (!$allPackageProperties) {
Write-Error "Package properties are not available for service directory $serviceDirectory"
exit 1
}
}
if ($allPackageProperties)
if (-not (Test-Path -Path $outDirectory))
{
New-Item -ItemType Directory -Force -Path $outDirectory | Out-Null
}
foreach($pkg in $allPackageProperties)
{
if (-not (Test-Path -Path $outDirectory))
{
New-Item -ItemType Directory -Force -Path $outDirectory
}
foreach($pkg in $allPackageProperties)
{
if ($pkg.Name) {
Write-Host "Package Name: $($pkg.Name)"
Write-Host "Package Version: $($pkg.Version)"
@ -130,7 +143,7 @@ if ($allPackageProperties)
if (-not (Test-Path -path $outDir))
{
Write-Host "Creating directory $($outDir) for json property file"
New-Item -ItemType Directory -Path $outDir
New-Item -ItemType Directory -Path $outDir | Out-Null
}
# If package properties for a track 2 (IsNewSdk = true) package has
@ -143,12 +156,6 @@ if ($allPackageProperties)
SetOutput $outputPath $pkg
}
}
}
Get-ChildItem -Path $outDirectory
}
else
{
Write-Error "Package properties are not available for service directory $serviceDirectory or $prdiff"
exit 1
}
Get-ChildItem -Path $outDirectory