Skip to content

Commit 975ad22

Browse files
authored
Sync eng/common directory with azure-sdk-tools for PR 2064 (Azure#2953)
1 parent 6303dd6 commit 975ad22

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

eng/common/pipelines/templates/steps/update-docsms-metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ steps:
7575
DefaultBranchVariableName: TargetBranchName
7676

7777
- pwsh: |
78-
$packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"')
78+
$packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"').Replace("\\", "/")
7979
$packageInfoLocations = ConvertFrom-Json $packageInfoJson
8080
${{ parameters.ScriptDirectory }}/Update-DocsMsMetadata.ps1 `
8181
-PackageInfoJsonLocations $packageInfoLocations `

eng/common/scripts/Update-DocsMsMetadata.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ function GetAdjustedReadmeContent($ReadmeContent, $PackageInfo, $PackageMetadata
6262

6363
# Generate the release tag for use in link substitution
6464
$tag = "$($PackageInfo.Name)_$($PackageInfo.Version)"
65+
Write-Host "The tag of package: $tag"
6566
$date = Get-Date -Format "MM/dd/yyyy"
6667

6768

@@ -97,9 +98,13 @@ ms.service: $service
9798
}
9899

99100
function UpdateDocsMsMetadataForPackage($packageInfoJsonLocation) {
101+
if (!(Test-Path $packageInfoJsonLocation)) {
102+
LogWarning "Package metadata not found for $packageInfoJsonLocation"
103+
return
104+
}
105+
100106
$packageInfoJson = Get-Content $packageInfoJsonLocation -Raw
101107
$packageInfo = ConvertFrom-Json $packageInfoJson
102-
103108
$originalVersion = [AzureEngSemanticVersion]::ParseVersionString($packageInfo.Version)
104109
if ($packageInfo.DevVersion) {
105110
# If the package is of a dev version there may be language-specific needs to

0 commit comments

Comments
 (0)