Skip to content

Commit

Permalink
Update references from master to main (#1799)
Browse files Browse the repository at this point in the history
Co-authored-by: Wes Haggard <[email protected]>
  • Loading branch information
azure-sdk and weshaggard authored Jun 25, 2021
1 parent fd85a74 commit da83a5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion eng/common/scripts/Verify-Links.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
List of http status codes that count as broken links. Defaults to 400, 401, 404, SocketError.HostNotFound = 11001, SocketError.NoData = 11004.
.PARAMETER branchReplaceRegex
Regex to check if the link needs to be replaced. E.g. ^(https://github.com/.*/(?:blob|tree)/)master(/.*)$
Regex to check if the link needs to be replaced. E.g. ^(https://github.com/.*/(?:blob|tree)/)main(/.*)$
.PARAMETER branchReplacementName
The substitute branch name or SHA commit.
Expand Down
10 changes: 5 additions & 5 deletions eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ function GetAdjustedReadmeContent($pkgInfo){
$fileContent = $fileContent -replace $titleRegex, "`${0} - Version $($pkgInfo.PackageVersion) `n"
$foundTitle = $matches["filetitle"]
}
# Replace github master link with release tag.
# Replace github main link with release tag.
$ReplacementPattern = "`${1}$($pkgInfo.Tag)"
$fileContent = $fileContent -replace $releaseReplaceRegex, $ReplacementPattern

$header = "---`ntitle: $foundTitle`nkeywords: Azure, $Language, SDK, API, $($pkgInfo.PackageId), $service`nauthor: maggiepint`nms.author: magpint`nms.date: $date`nms.topic: article`nms.prod: azure`nms.technology: azure`nms.devlang: $Language`nms.service: $service`n---`n"

if ($fileContent) {
Expand Down Expand Up @@ -101,7 +101,7 @@ foreach ($config in $targets) {
if ($pkgsFiltered) {
Write-Host "Given the visible artifacts, $($config.mode) Readme updates against $($config.path_to_config) will be processed for the following packages."
Write-Host ($pkgsFiltered | % { $_.PackageId + " " + $_.PackageVersion })

foreach ($packageInfo in $pkgsFiltered) {
$readmeName = "$($packageInfo.DocsReadMeName.ToLower())-readme${suffix}.md"
$readmeFolder = Join-Path $DocRepoLocation $config.content_folder
Expand All @@ -115,12 +115,12 @@ foreach ($config in $targets) {
if ($packageInfo.ReadmeContent) {
$adjustedContent = GetAdjustedReadmeContent -pkgInfo $packageInfo
}

if ($adjustedContent) {
try {
Push-Location $DocRepoLocation
Set-Content -Path $readmeLocation -Value $adjustedContent -Force

Write-Host "Updated readme for $readmeName."
} catch {
Write-Host $_
Expand Down

0 comments on commit da83a5e

Please sign in to comment.