From 00c70e7e318ebf481dbad0152cf3f67a7aae4895 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Thu, 24 Jun 2021 15:42:04 -0700 Subject: [PATCH] Update references from master to main --- eng/common/scripts/Verify-Links.ps1 | 2 +- eng/common/scripts/update-docs-metadata.ps1 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 6267d4d1b2b8..3808d1f8bb5e 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -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. diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1 index 6154afd51591..bc9d426cc59a 100644 --- a/eng/common/scripts/update-docs-metadata.ps1 +++ b/eng/common/scripts/update-docs-metadata.ps1 @@ -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) { @@ -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 @@ -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 $_