Fix hard-coded master (#2463)

Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-06-18 13:42:32 -07:00 committed by GitHub
parent da1451586a
commit 0163b09994
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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) {