зеркало из
1
0
Форкнуть 0

Skip creating automatic API review for ci disabled packages (#35002)

This commit is contained in:
Praven Kuttappan 2024-04-01 10:58:04 -04:00 коммит произвёл GitHub
Родитель 66efa24fce
Коммит c86270b6da
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 15 добавлений и 1 удалений

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

@ -523,7 +523,8 @@ function Find-python-Artifacts-For-Apireview($artifactDir, $artifactName)
return $null
}
$whlDirectory = (Join-Path -Path $artifactDir -ChildPath $artifactName.Replace("_","-"))
$packageName = $artifactName.Replace("_","-")
$whlDirectory = (Join-Path -Path $artifactDir -ChildPath $packageName)
Write-Host "Searching for $($artifactName) wheel in artifact path $($whlDirectory)"
$files = @(Get-ChildItem $whlDirectory | ? {$_.Name.EndsWith(".whl")})
@ -539,6 +540,19 @@ function Find-python-Artifacts-For-Apireview($artifactDir, $artifactName)
return $null
}
# Python requires pregenerated token file in addition to wheel to generate API review.
# Make sure that token file exists in same path as wheel file.
$tokenFile = Join-Path -Path $whlDirectory -ChildPath "${packageName}_Python.json"
if (!(Test-Path $tokenFile))
{
Write-Host "API review token file for $($artifactName) does not exist in path $($whlDirectory). Skipping API review for $packageName"
return $null
}
else
{
Write-Host "Found API review token file for $($tokenFile)"
}
$packages = @{
$files[0].Name = $files[0].FullName
}