From fda88bf7b8389575b9d973821efc604442e10493 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Fri, 18 Jun 2021 09:09:27 -0700 Subject: [PATCH] Update for "master" -> "main" branch rename (#2455) * vcpkg.json -- update all links to point to "main" .. This is hardcoded and will go out in future releases. * ci.yml -- add `- main` to trigger criteria near `- master` ... This adds forward compatilbitiy when we rename the branch in the repo * archetype-cpp-release.yml use a script which evaluates a repo's default branch and sets that in a global variable, then use that variable instead. When vcpkg updates their branch the publishing scripts will work transparently. * Collect-Changelogs.ps1 -- Add default hardcoded branch name for use with future releases. This can be optionally overridden with a parameter when invoking the script. * eng/pipelines/client.yml -- Delete this file. It is no longer in use. --- eng/pipelines/client.yml | 23 ------------------- .../stages/archetype-cpp-release.yml | 6 ++++- eng/scripts/Collect-Changelogs.ps1 | 7 ++++-- sdk/core/azure-core/vcpkg/vcpkg.json | 2 +- sdk/identity/azure-identity/vcpkg/vcpkg.json | 2 +- .../vcpkg/vcpkg.json | 2 +- .../vcpkg/vcpkg.json | 2 +- .../azure-storage-blobs/vcpkg/vcpkg.json | 2 +- .../azure-storage-common/vcpkg/vcpkg.json | 2 +- .../vcpkg/vcpkg.json | 2 +- .../vcpkg/vcpkg.json | 2 +- sdk/template/azure-template/vcpkg/vcpkg.json | 2 +- 12 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 eng/pipelines/client.yml diff --git a/eng/pipelines/client.yml b/eng/pipelines/client.yml deleted file mode 100644 index c12d2927e..000000000 --- a/eng/pipelines/client.yml +++ /dev/null @@ -1,23 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated automatically and any changes will be lost. - -trigger: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - -pr: - branches: - include: - - master - - feature/* - - release/* - - hotfix/* - -jobs: - - template: ./templates/jobs/archetype-sdk-client.yml - parameters: - BuildReleaseArtifacts: false diff --git a/eng/pipelines/templates/stages/archetype-cpp-release.yml b/eng/pipelines/templates/stages/archetype-cpp-release.yml index 4607c3fc3..2a75fcc18 100644 --- a/eng/pipelines/templates/stages/archetype-cpp-release.yml +++ b/eng/pipelines/templates/stages/archetype-cpp-release.yml @@ -143,6 +143,10 @@ stages: - pwsh: Write-Host "##vso[task.setvariable variable=HasChanges]$true" displayName: Set $(HasChanges) to $true for create-pull-request.yml + - template: /eng/common/pipelines/templates/steps/set-default-branch.yml + parameters: + WorkingDirectory: $(Pipeline.Workspace)/vcpkg + # SkipCheckingForChanges is true to skip the commit step # (which is already done by Update-VcpkgPort.ps1) - template: /eng/common/pipelines/templates/steps/create-pull-request.yml @@ -154,7 +158,7 @@ stages: PRTitle: $(PrTitle) PRBody: Update vcpkg ports for Azure SDK release. This release may contain multiple ports. SkipCheckingForChanges: true - BaseBranchName: master + BaseBranchName: $(DefaultBranch) OpenAsDraft: ${{ parameters.TestPipeline }} CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}' diff --git a/eng/scripts/Collect-Changelogs.ps1 b/eng/scripts/Collect-Changelogs.ps1 index a3cee7262..8eba2e3fc 100644 --- a/eng/scripts/Collect-Changelogs.ps1 +++ b/eng/scripts/Collect-Changelogs.ps1 @@ -18,7 +18,10 @@ param( [Parameter(Mandatory=$true)] [ValidateRange(1, 12)] - [int] $Month + [int] $Month, + + [Parameter] + [string] $DefaultBranchName = 'main' ) $repoRoot = Resolve-Path "$PSScriptRoot/../.."; @@ -47,7 +50,7 @@ Get-ChildItem "$repoRoot/sdk" -Filter CHANGELOG.md -Recurse | Sort-Object -Prope $version = $changeLogEntry.ReleaseVersion $githubAnchor = $changeLogEntry.ReleaseTitle.Replace("## ", "").Replace(".", "").Replace("(", "").Replace(")", "").Replace(" ", "-") - $ReleaseNotes += "### $package [Changelog](https://github.com/Azure/azure-sdk-for-cpp/blob/master/sdk/$serviceDirectory/$package/CHANGELOG.md#$githubAnchor)`n" + $ReleaseNotes += "### $package [Changelog](https://github.com/Azure/azure-sdk-for-cpp/blob/${DefaultBranchName}/sdk/$serviceDirectory/$package/CHANGELOG.md#$githubAnchor)`n" $changeLogEntry.ReleaseContent | %{ $ReleaseNotes += $_.Replace("###", "####") diff --git a/sdk/core/azure-core/vcpkg/vcpkg.json b/sdk/core/azure-core/vcpkg/vcpkg.json index afa8c4476..5c5363716 100644 --- a/sdk/core/azure-core/vcpkg/vcpkg.json +++ b/sdk/core/azure-core/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Core SDK for C++", "This library provides shared primitives, abstractions, and helpers for modern Azure SDK client libraries written in the C++." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/core/azure-core", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/core/azure-core", "license": "MIT", "dependencies": [ { diff --git a/sdk/identity/azure-identity/vcpkg/vcpkg.json b/sdk/identity/azure-identity/vcpkg/vcpkg.json index 37ccbd66d..30354a2b9 100644 --- a/sdk/identity/azure-identity/vcpkg/vcpkg.json +++ b/sdk/identity/azure-identity/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Identity SDK for C++", "This library provides common authentication-related abstractions for Azure SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/identity/azure-identity", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/identity/azure-identity", "license": "MIT", "dependencies": [ { diff --git a/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json b/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json index 64810b9d7..e15236361 100644 --- a/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json +++ b/sdk/keyvault/azure-security-keyvault-common/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Common Key Vault SDK for C++", "This library provides common Azure Key Vault related abstractions for Azure SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/keyvault/azure-security-keyvault-common", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/keyvault/azure-security-keyvault-common", "license": "MIT", "dependencies": [ { diff --git a/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json b/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json index 797dace02..fceadf10b 100644 --- a/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json +++ b/sdk/keyvault/azure-security-keyvault-keys/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Key Vault Keys SDK for C++", "This library provides Azure Key Vault Keys SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/keyvault/azure-security-keyvault-keys", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/keyvault/azure-security-keyvault-keys", "license": "MIT", "dependencies": [ { diff --git a/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json b/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json index 6843bd474..6c02197da 100644 --- a/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-blobs/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Storage Blobs SDK for C++", "This library provides Azure Storage Blobs SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-blobs", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-blobs", "license": "MIT", "dependencies": [ { diff --git a/sdk/storage/azure-storage-common/vcpkg/vcpkg.json b/sdk/storage/azure-storage-common/vcpkg/vcpkg.json index 0e4f9c6f0..bbada0d55 100644 --- a/sdk/storage/azure-storage-common/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-common/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Common Storage SDK for C++", "This library provides common Azure Storage-related abstractions for Azure SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-common", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-common", "license": "MIT", "dependencies": [ { diff --git a/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json b/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json index 59a5d943d..1712adb0e 100644 --- a/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-files-datalake/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Storage Files Data Lake SDK for C++", "This library provides Azure Storage Files Data Lake SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-files-datalake", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-files-datalake", "license": "MIT", "dependencies": [ { diff --git a/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json b/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json index b2c30aaa5..fe83d2926 100644 --- a/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json +++ b/sdk/storage/azure-storage-files-shares/vcpkg/vcpkg.json @@ -8,7 +8,7 @@ "Microsoft Azure Storage Files Shares SDK for C++", "This library provides Azure Storage Files Shares SDK." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage/azure-storage-files-shares", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/storage/azure-storage-files-shares", "license": "MIT", "dependencies": [ { diff --git a/sdk/template/azure-template/vcpkg/vcpkg.json b/sdk/template/azure-template/vcpkg/vcpkg.json index f9da71543..dfb83a0e1 100644 --- a/sdk/template/azure-template/vcpkg/vcpkg.json +++ b/sdk/template/azure-template/vcpkg/vcpkg.json @@ -9,7 +9,7 @@ "This is a template library meant to illustrate initial client library development process for Azure SDK.", "It is not meant to be published to vcpkg." ], - "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/template/azure-template", + "homepage": "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/template/azure-template", "license": "MIT", "dependencies": [ {