From 877d09aa862aea049cd58ec1545153c7574fc662 Mon Sep 17 00:00:00 2001 From: HeyImChris <48299693+HeyImChris@users.noreply.github.com> Date: Thu, 6 Jan 2022 13:24:34 -0800 Subject: [PATCH] Transition our CI from using master to main (#939) * android * move CI to main --- .ado/android-pr.yml | 2 +- .ado/apple-integration.yml | 4 ++-- .ado/apple-pr.yml | 2 +- .ado/publish.yml | 16 ++++++++-------- .ado/templates/android-build-office.yml | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.ado/android-pr.yml b/.ado/android-pr.yml index 3507ec1b96..d6865a5888 100644 --- a/.ado/android-pr.yml +++ b/.ado/android-pr.yml @@ -6,7 +6,7 @@ trigger: none # will disable CI builds entirely pr: branches: include: - - master + - main - '*-stable' paths: exclude: diff --git a/.ado/apple-integration.yml b/.ado/apple-integration.yml index f4185b971b..0e3a434fca 100644 --- a/.ado/apple-integration.yml +++ b/.ado/apple-integration.yml @@ -4,7 +4,7 @@ variables: trigger: branches: include: - - master + - main - '*-stable' paths: exclude: @@ -12,7 +12,7 @@ trigger: pr: branches: include: - - master + - main - '*-stable' paths: exclude: diff --git a/.ado/apple-pr.yml b/.ado/apple-pr.yml index 10498a87aa..6119efa216 100644 --- a/.ado/apple-pr.yml +++ b/.ado/apple-pr.yml @@ -9,7 +9,7 @@ trigger: none # will disable CI builds entirely pr: branches: include: - - master + - main - '*-stable' paths: exclude: diff --git a/.ado/publish.yml b/.ado/publish.yml index 4a5cce7542..fa24aaf5de 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -8,7 +8,7 @@ trigger: batch: true branches: include: - - master + - main - '*-stable' paths: exclude: @@ -44,11 +44,11 @@ jobs: - bash: echo "##vso[task.setvariable variable=npmDistTag]canary" displayName: Set dist-tag to canary - condition: eq(variables['Build.SourceBranchName'], 'master') + condition: eq(variables['Build.SourceBranchName'], 'main') - bash: echo "##vso[task.setvariable variable=npmDistTag]v${{variables['Build.SourceBranchName']}}" displayName: Set dist-tag to v0.x-stable - condition: and(ne(variables['Build.SourceBranchName'], 'master'), ne(variables['Build.SourceBranchName'], variables.latestStableBranch)) + condition: and(ne(variables['Build.SourceBranchName'], 'main'), ne(variables['Build.SourceBranchName'], variables.latestStableBranch)) - template: templates/apple-node-setup.yml @@ -61,7 +61,7 @@ jobs: displayName: Bump stable package version inputs: script: node .ado/bumpFileVersions.js - condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'master')) + condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'main')) - task: CmdLine@2 displayName: pod update React-TurboModuleCxx-RNW @@ -69,13 +69,13 @@ jobs: script: | cd packages/rn-tester pod update React-TurboModuleCxx-RNW - condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'master')) + condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'main')) - task: CmdLine@2 displayName: Bump canary package version inputs: script: node scripts/bump-oss-version.js --nightly - condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master')) + condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'main')) # Publish will fail if package.json is marked as private - task: CmdLine@2 @@ -101,7 +101,7 @@ jobs: BUILD_SOURCEBRANCH: $(Build.SourceBranch) SYSTEM_ACCESSTOKEN: $(System.AccessToken) githubApiToken: $(githubApiToken) - condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'master')) + condition: and(succeeded(), ne(variables['Build.SourceBranchName'], 'main')) - job: RNMacOSInitNpmJSPublish @@ -110,7 +110,7 @@ jobs: vmImage: vs2017-win2016 timeoutInMinutes: 90 # how long to run the job before automatically cancelling cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them - condition: eq(variables['Build.SourceBranchName'], 'master') + condition: eq(variables['Build.SourceBranchName'], 'main') steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found clean: true # whether to fetch clean each time diff --git a/.ado/templates/android-build-office.yml b/.ado/templates/android-build-office.yml index e363e5b77b..543d73c1ec 100644 --- a/.ado/templates/android-build-office.yml +++ b/.ado/templates/android-build-office.yml @@ -44,12 +44,12 @@ steps: # Libraries/Core/ReactNativeVersion.js # # --nightly => version = `0.0.0-${currentCommit.slice(0, 9)}`; - # When on master branch or non-stable branch. + # When on main branch or non-stable branch. - task: CmdLine@2 displayName: Bump canary package version inputs: script: node scripts/bump-oss-version.js --nightly - condition: or(eq(variables['Build.SourceBranchName'], 'master'), not(contains(variables['Build.SourceBranchName'], '-stable'))) + condition: or(eq(variables['Build.SourceBranchName'], 'main'), not(contains(variables['Build.SourceBranchName'], '-stable'))) # TODO: We don't seem to be running bump-oss-version.js for stable branches, hence we would end up publishing using the values in the repository.