Sync eng/common directory with azure-sdk-tools for PR 1353 (#551)

* Use a helper function to normalize the package name for readme

* Get the readme name from artifact-metadata-parsing

* Change to the readme

* Update eng/common/scripts/artifact-metadata-parsing.ps1

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>

Co-authored-by: Sima Zhu <sizhu@microsoft.com>
Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2021-02-01 18:56:16 -08:00 коммит произвёл GitHub
Родитель fd6e5648b2
Коммит f4d91a217c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -123,7 +123,10 @@ function VerifyPackages($artifactLocation, $workingDirectory, $apiUrl, $releaseS
Write-Host "Maybe a pkg version wasn't updated properly?"
exit(1)
}
$docsReadMeName = $parsedPackage.PackageId
if ($parsedPackage.DocsReadMeName) {
$docsReadMeName = $parsedPackage.DocsReadMeName
}
$pkgList += New-Object PSObject -Property @{
PackageId = $parsedPackage.PackageId
PackageVersion = $parsedPackage.PackageVersion
@ -131,6 +134,7 @@ function VerifyPackages($artifactLocation, $workingDirectory, $apiUrl, $releaseS
Tag = $parsedPackage.ReleaseTag
ReleaseNotes = $parsedPackage.ReleaseNotes
ReadmeContent = $parsedPackage.ReadmeContent
DocsReadMeName = $docsReadMeName
IsPrerelease = [AzureEngSemanticVersion]::ParseVersionString($parsedPackage.PackageVersion).IsPrerelease
}
}

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

@ -103,7 +103,7 @@ foreach ($config in $targets) {
Write-Host ($pkgsFiltered | % { $_.PackageId + " " + $_.PackageVersion })
foreach ($packageInfo in $pkgsFiltered) {
$readmeName = "$($packageInfo.PackageId.Replace('azure-','').Replace('Azure.', '').Replace('@azure/', '').ToLower())-readme${suffix}.md"
$readmeName = "$($packageInfo.DocsReadMeName.ToLower())-readme${suffix}.md"
$readmeFolder = Join-Path $DocRepoLocation $config.content_folder
$readmeLocation = Join-Path $readmeFolder $readmeName