Sync eng/common directory with azure-sdk-tools for PR 2064 (#2953)

This commit is contained in:
Azure SDK Bot 2021-10-06 09:30:57 -07:00 committed by GitHub
parent 6303dd6d32
commit 975ad22708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -75,7 +75,7 @@ steps:
DefaultBranchVariableName: TargetBranchName
- pwsh: |
$packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"')
$packageInfoJson = '${{ convertToJson(parameters.PackageInfoLocations) }}'.Trim('"').Replace("\\", "/")
$packageInfoLocations = ConvertFrom-Json $packageInfoJson
${{ parameters.ScriptDirectory }}/Update-DocsMsMetadata.ps1 `
-PackageInfoJsonLocations $packageInfoLocations `

View File

@ -62,6 +62,7 @@ function GetAdjustedReadmeContent($ReadmeContent, $PackageInfo, $PackageMetadata
# Generate the release tag for use in link substitution
$tag = "$($PackageInfo.Name)_$($PackageInfo.Version)"
Write-Host "The tag of package: $tag"
$date = Get-Date -Format "MM/dd/yyyy"
@ -97,9 +98,13 @@ ms.service: $service
}
function UpdateDocsMsMetadataForPackage($packageInfoJsonLocation) {
if (!(Test-Path $packageInfoJsonLocation)) {
LogWarning "Package metadata not found for $packageInfoJsonLocation"
return
}
$packageInfoJson = Get-Content $packageInfoJsonLocation -Raw
$packageInfo = ConvertFrom-Json $packageInfoJson
$originalVersion = [AzureEngSemanticVersion]::ParseVersionString($packageInfo.Version)
if ($packageInfo.DevVersion) {
# If the package is of a dev version there may be language-specific needs to