Fix hard-coded master (#2463)
Co-authored-by: Chidozie Ononiwu <chononiw@microsoft.com>
This commit is contained in:
parent
da1451586a
commit
0163b09994
@ -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"
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user