Sync eng/common directory with azure-sdk-tools repository for Tools PR 999 (#661)
This commit is contained in:
parent
9d83f2c7bd
commit
7f2a11d9c9
@ -70,12 +70,14 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){
|
||||
}
|
||||
|
||||
$fileContent = $pkgInfo.ReadmeContent
|
||||
$foundTitle = ""
|
||||
|
||||
# only replace the version if the formatted header can be found
|
||||
$titleRegex = "(\# Azure .+? (?:client|plugin|shared) library for (?:JavaScript|Java|Python|\.NET|C))"
|
||||
$fileContent = $pkgInfo.ReadmeContent -replace $titleRegex, "`${1} - Version $($pkgInfo.PackageVersion) `n"
|
||||
|
||||
$titleRegex = "(\#\s+(?<filetitle>Azure .+? (?:client|plugin|shared) library for (?:JavaScript|Java|Python|\.NET|C)))"
|
||||
$foundTitle = ""
|
||||
if ($fileContent -match $titleRegex) {
|
||||
$fileContent = $fileContent -replace $titleRegex, "`${0} - Version $($pkgInfo.PackageVersion) `n"
|
||||
$foundTitle = $matches["filetitle"]
|
||||
}
|
||||
# Replace github master link with release tag.
|
||||
$ReplacementPattern = "`${1}$($pkgInfo.Tag)"
|
||||
$fileContent = $fileContent -replace $releaseReplaceRegex, $ReplacementPattern
|
||||
|
||||
Loading…
Reference in New Issue
Block a user