diff --git a/README.md b/README.md index 92b5910..f407e99 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://dev.azure.com/devdiv/DevDiv/_apis/build/status/Azure.azure-notificationhubs-xamarin?repoName=Azure%2Fazure-notificationhubs-xamarin&branchName=master)](https://dev.azure.com/devdiv/DevDiv/_build/latest?definitionId=13458&repoName=Azure%2Fazure-notificationhubs-xamarin&branchName=master) +[![Build Status](https://dev.azure.com/devdiv/DevDiv/_apis/build/status/Azure.azure-notificationhubs-xamarin?repoName=Azure%2Fazure-notificationhubs-xamarin&branchName=main)](https://dev.azure.com/devdiv/DevDiv/_build/latest?definitionId=13458&repoName=Azure%2Fazure-notificationhubs-xamarin&branchName=main) # Azure Notification Hubs for Xamarin diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9f56ca4..2ff6e60 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,6 @@ variables: # job parameters - masterBranchName: 'master' + mainBranchName: 'main' submodules: false # job software version parameters macosImage: 'macos-latest' @@ -55,12 +55,12 @@ jobs: inputs: checkLatest: true displayName: 'Download the latest nuget.exe' - # determine the last successful build for "master" branch + # determine the last successful build for "main" branch - pwsh: | - # determine the "master" branch - $masterBranch = "$(masterBranchName)" - $encodedBranch = [Uri]::EscapeDataString("refs/heads/$masterBranch") - Write-Host "Master branch: $masterBranch" + # determine the "main" branch + $mainBranch = "$(mainBranchName)" + $encodedBranch = [Uri]::EscapeDataString("refs/heads/$mainBranch") + Write-Host "Main branch: $mainBranch" # determine the "current" branch $branch = "$(Build.SourceBranch)" if ("$env:SYSTEM_PULLREQUEST_TARGETBRANCH") { @@ -74,10 +74,10 @@ jobs: $branch = $branch.Substring(10) Write-Host "Current tag: $branch" } - if (($branch -eq $masterBranch) -and ("$(System.PullRequest.IsFork)" -eq "False")) { - Write-Host "Branch is master, fetching last successful build commit..." + if (($branch -eq $mainBranch) -and ("$(System.PullRequest.IsFork)" -eq "False")) { + Write-Host "Branch is main, fetching last successful build commit..." $url = "$(System.TeamFoundationCollectionUri)$(System.TeamProjectId)/_apis/build/builds/?definitions=$(System.DefinitionId)&branchName=$encodedBranch&statusFilter=completed&resultFilter=succeeded&api-version=5.0" - Write-Host "URL for last successful master build: $url" + Write-Host "URL for last successful main build: $url" $json = Invoke-RestMethod -Uri $url -Headers @{ Authorization = "Bearer $(System.AccessToken)" } @@ -88,7 +88,7 @@ jobs: if ($lastSuccessfulBuildCommit) { Write-Host "Last successful commit found: $lastSuccessfulBuildCommit" } else { - $lastSuccessfulBuildCommit = "origin/$masterBranch" + $lastSuccessfulBuildCommit = "origin/$mainBranch" Write-Host "No previously successful build found, using $lastSuccessfulBuildCommit." } Write-Host "##vso[task.setvariable variable=GitLastSuccessfulCommit]$lastSuccessfulBuildCommit" @@ -124,7 +124,7 @@ jobs: - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: - task: ComponentGovernanceComponentDetection@0 displayName: 'Run component detection' - condition: and(always(), eq('refs/heads/$(masterBranchName)', variables['Build.SourceBranch'])) + condition: and(always(), eq('refs/heads/$(mainBranchName)', variables['Build.SourceBranch'])) inputs: scanType: 'Register' verbosity: 'Verbose' diff --git a/src/Microsoft.Azure.NotificationHubs.Client/Microsoft.Azure.NotificationHubs.Client.csproj b/src/Microsoft.Azure.NotificationHubs.Client/Microsoft.Azure.NotificationHubs.Client.csproj index 0d4b360..219a023 100644 --- a/src/Microsoft.Azure.NotificationHubs.Client/Microsoft.Azure.NotificationHubs.Client.csproj +++ b/src/Microsoft.Azure.NotificationHubs.Client/Microsoft.Azure.NotificationHubs.Client.csproj @@ -31,8 +31,8 @@ true Microsoft.Azure.NotificationHubs.Client 1.0.0 - https://raw.githubusercontent.com/Azure/azure-notificationhubs-xamarin/master/.github/icons/aznh-icon-128x128.png - https://raw.githubusercontent.com/Azure/azure-notificationhubs-xamarin/master/LICENSE + https://raw.githubusercontent.com/Azure/azure-notificationhubs-xamarin/main/.github/icons/aznh-icon-128x128.png + https://raw.githubusercontent.com/Azure/azure-notificationhubs-xamarin/main/LICENSE https://github.com/Azure/azure-notificationhubs-xamarin/ Microsoft Microsoft