From da83a5e6d297c8d46da75aae34e7e303b1d6bafe Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 24 Jun 2021 17:35:04 -0700 Subject: [PATCH] Update references from master to main (#1799) Co-authored-by: Wes Haggard --- 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 6267d4d1b2..3808d1f8bb 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 6154afd515..bc9d426cc5 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 $_