Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 2064 (#24565)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Oct 6, 2021
1 parent c7a5345 commit d9bd11a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 `
Expand Down
7 changes: 6 additions & 1 deletion eng/common/scripts/Update-DocsMsMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d9bd11a

Please sign in to comment.