From 1d0b3dd7ae5a2192ca902ac1835fc31a6898121d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 18 Jun 2021 13:45:45 -0700 Subject: [PATCH] Fix hard-coded master (#15843) Co-authored-by: Chidozie Ononiwu --- eng/common/pipelines/templates/steps/set-default-branch.yml | 4 ++-- eng/common/scripts/update-docs-metadata.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/common/pipelines/templates/steps/set-default-branch.yml b/eng/common/pipelines/templates/steps/set-default-branch.yml index e3eed4512d97..491edaa8b68d 100644 --- a/eng/common/pipelines/templates/steps/set-default-branch.yml +++ b/eng/common/pipelines/templates/steps/set-default-branch.yml @@ -5,8 +5,8 @@ steps: - pwsh: | $setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1' if ($LASTEXITCODE -ne 0) { - Write-Host "Not able to fetch the default branch from git command. Set to master." - $setDefaultBranch = 'master' + Write-Host "Not able to fetch the default branch from git command. Set to main." + $setDefaultBranch = 'main' } Write-Host "Setting DefaultBranch=$setDefaultBranch" Write-Host "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch" diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1 index fc16fea9e552..6154afd51591 100644 --- a/eng/common/scripts/update-docs-metadata.ps1 +++ b/eng/common/scripts/update-docs-metadata.ps1 @@ -24,7 +24,7 @@ param ( . (Join-Path $PSScriptRoot common.ps1) -$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)master" +$releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)main" function GetMetaData { if (Test-Path Variable:MetadataUri) {