Fix bug in Changelog URL path using packageDirectoryName (#1878)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-03-11 16:50:56 -08:00 committed by GitHub
parent fc79c5b3ad
commit 6a8aff701c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,7 @@ foreach ($packageProp in $allPackageProps) {
$changeLogEntries = Get-ChangeLogEntries -ChangeLogLocation $changeLogLocation
$packageName = $packageProp.Name
$serviceDirectory = $packageProp.ServiceDirectory
$packageDirectoryname = Split-Path -Path $packageProp.DirectoryPath -Leaf
foreach ($changeLogEntry in $changeLogEntries.Values) {
if ([System.String]::IsNullOrEmpty($changeLogEntry.ReleaseStatus))
@ -48,7 +49,7 @@ foreach ($packageProp in $allPackageProps) {
$releaseHighlights[$key] = @{}
$releaseHighlights[$key]["PackageProperties"] = $packageProp
$releaseHighlights[$key]["ChangelogUrl"] = "https://github.com/Azure/azure-sdk-for-${LanguageShort}/blob/${releaseTag}/sdk/${serviceDirectory}/${packageName}/CHANGELOG.md#${githubAnchor}"
$releaseHighlights[$key]["ChangelogUrl"] = "https://github.com/Azure/azure-sdk-for-${LanguageShort}/blob/${releaseTag}/sdk/${serviceDirectory}/${packageDirectoryname}/CHANGELOG.md#${githubAnchor}"
$releaseHighlights[$key]["Content"] = @()
$changeLogEntry.ReleaseContent | %{