Просмотр исходного кода

[Infra] Rename references from `master` to `main` (#12203)

Nick Cooke 2 лет назад
Родитель
Сommit
ca522d2d2a
42 измененных файлов с 179 добавлено и 179 удалено
  1. 1 1
      .github/workflows/check.yml
  2. 2 2
      .github/workflows/health-metrics-presubmit.yml
  3. 1 1
      .github/workflows/performance-integration-tests.yml
  4. 1 1
      .github/workflows/performance.yml
  5. 4 4
      .github/workflows/prerelease.yml
  6. 1 1
      .github/workflows/release.yml
  7. 1 1
      .github/workflows/sessions-integration-tests.yml
  8. 2 2
      CONTRIBUTING.md
  9. 2 2
      Carthage.md
  10. 1 1
      Crashlytics/CHANGELOG.md
  11. 4 4
      FirebaseAppDistributionInternal/README.md
  12. 1 1
      FirebaseAuth/Sources/Backend/FIRAuthBackend.h
  13. 3 3
      FirebaseCore/CHANGELOG.md
  14. 1 1
      FirebaseDynamicLinks/CHANGELOG.md
  15. 1 1
      FirebaseInAppMessaging/Sources/DefaultUI/FIRCore+InAppMessagingDisplay.h
  16. 1 1
      FirebaseInAppMessaging/Sources/FIRCore+InAppMessaging.h
  17. 1 1
      FirebasePerformance/ProtoSupport/README.md
  18. 4 4
      FirebasePerformance/Tests/TestApp/Source/ViewControllers/ScreenTracesViewController.m
  19. 2 2
      FirebaseRemoteConfigSwift/CHANGELOG.md
  20. 4 4
      FirebaseRemoteConfigSwift/Tests/README.md
  21. 1 1
      Firestore/CHANGELOG.md
  22. 12 12
      Firestore/core/test/unit/FSTGoogleTestTests.mm
  23. 3 3
      README.md
  24. 6 6
      ROADMAP.md
  25. 1 1
      ReleaseTooling/Sources/FirebaseReleaser/InitializeRelease.swift
  26. 1 1
      ReleaseTooling/Template/README.md
  27. 1 1
      ReleaseTooling/ZipBuilderV2Plan.md
  28. 1 1
      ReleaseTooling/ZipBuilderV3Plan.md
  29. 1 1
      SwiftDashboard.md
  30. 17 17
      docs/ContinuousIntegration.md
  31. 1 1
      docs/FirebaseOptionsPerProduct.md
  32. 54 54
      scripts/README.md
  33. 18 18
      scripts/check.sh
  34. 1 1
      scripts/check_imports.swift
  35. 1 1
      scripts/check_lint.py
  36. 3 3
      scripts/check_secrets.sh
  37. 1 1
      scripts/create_pull_request.rb
  38. 6 6
      scripts/create_spec_repo/README.md
  39. 7 7
      scripts/health_metrics/README.md
  40. 1 1
      scripts/lib/git.py
  41. 3 3
      scripts/setup_check.sh
  42. 1 1
      scripts/style.sh

+ 1 - 1
.github/workflows/check.yml

@@ -5,7 +5,7 @@ on:
     paths-ignore:
     - 'Firestore/**'
   push:
-    branches: master
+    branches: main
 
 concurrency:
     group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}

+ 2 - 2
.github/workflows/health-metrics-presubmit.yml

@@ -58,7 +58,7 @@ jobs:
     needs: check
     # Prevent the job from being triggered in fork.
     # always() will trigger this job when `needs` are skipped in a `merge` pull_request event.
-    if: always() && github.event.pull_request.head.repo.full_name == github.repository && ((github.event.action != 'closed' &&  github.event.pull_request.base.ref == 'master') || github.event.pull_request.merged)
+    if: always() && github.event.pull_request.head.repo.full_name == github.repository && ((github.event.action != 'closed' &&  github.event.pull_request.base.ref == 'main') || github.event.pull_request.merged)
     runs-on: macos-12
     strategy:
       matrix:
@@ -384,7 +384,7 @@ jobs:
         with:
           path: /Users/runner/test
       - name: Compare Diff and Post a Report
-        if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'master'
+        if: github.event.pull_request.merged != true && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.ref == 'main'
         env:
           base_commit: ${{ needs.check.outputs.target_branch_head }}
         run: |

+ 1 - 1
.github/workflows/performance-integration-tests.yml

@@ -1,4 +1,4 @@
-# Merge the yml file to master branch for the cron job schedule to be effective.
+# Merge the yml file to main branch for the cron job schedule to be effective.
 # Reference: https://github.community/t/on-schedule-per-branch/17525
 name: performance-integration-tests
 

+ 1 - 1
.github/workflows/performance.yml

@@ -1,4 +1,4 @@
-# Merge the yml file to master branch for the cron job schedule to be effective.
+# Merge the yml file to main branch for the cron job schedule to be effective.
 # Reference: https://github.community/t/on-schedule-per-branch/17525
 name: performance
 

+ 4 - 4
.github/workflows/prerelease.yml

@@ -25,7 +25,7 @@ jobs:
       # testing repo.
       local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
       local_repo: specstesting
-      podspec_repo_branch: master
+      podspec_repo_branch: main
     outputs:
       matrix: ${{ steps.generate_matrix.outputs.matrix }}
     steps:
@@ -161,7 +161,7 @@ jobs:
       bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
       local_repo: specstesting
       local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
-      podspec_repo_branch: master
+      podspec_repo_branch: main
     steps:
     - uses: actions/checkout@v4
     - name: Get token
@@ -173,14 +173,14 @@ jobs:
     - name: Update SpecsTesting repo setup
       run: |
          ossbotaccess=`cat oss-bot-access.txt`
-         # Update/create a nightly tag to the head of the master branch.
+         # Update/create a nightly tag to the head of the main branch.
          BOT_TOKEN="${ossbotaccess}" test_version="${nightly_version}" sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" local_sdk_repo_dir="${local_sdk_repo_dir}" podspec_repo_branch="${podspec_repo_branch}" scripts/release_testing_setup.sh prerelease_testing
     - name: Push updated podspecs
       run: |
         botaccess=`cat bot-access.txt`
         cd "${local_sdk_repo_dir}"
         # Changes in post submit tests will be fetched by getting diff between
-        # the HEAD and HEAD^ of the master branch.
+        # the HEAD and HEAD^ of the main branch.
         common_commit=$(git rev-parse HEAD^)
         git diff --name-only $common_commit remotes/origin/${podspec_repo_branch} > updated_files.txt
         updated_podspecs=()

+ 1 - 1
.github/workflows/release.yml

@@ -27,7 +27,7 @@ jobs:
       # testing repo.
       local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
       local_repo: specstesting
-      podspec_repo_branch: master
+      podspec_repo_branch: main
     outputs:
       matrix: ${{ steps.generate_matrix.outputs.matrix }}
     steps:

+ 1 - 1
.github/workflows/sessions-integration-tests.yml

@@ -1,4 +1,4 @@
-# Merge the yml file to master branch for the cron job schedule to be effective.
+# Merge the yml file to main branch for the cron job schedule to be effective.
 # Reference: https://github.community/t/on-schedule-per-branch/17525
 name: sessions-integration-tests
 

+ 2 - 2
CONTRIBUTING.md

@@ -326,8 +326,8 @@ For developers without write access, you'll need to create a fork of Firebase
 instead of a branch. Learn more about forking a repo [here][github-forks].
 
 ```console
-# Update your local master
-git checkout master
+# Update your local main
+git checkout main
 git pull
 
 # Create a development branch

+ 2 - 2
Carthage.md

@@ -77,8 +77,8 @@ binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.jso
 
 - For Crashlytics, do the following steps to automatically upload your app's symbols so your app's crashes are symbolicated:
     - Download
-     [upload-symbols](https://github.com/firebase/firebase-ios-sdk/raw/master/Crashlytics/upload-symbols)
-     and [run](https://github.com/firebase/firebase-ios-sdk/raw/master/Crashlytics/run).
+     [upload-symbols](https://github.com/firebase/firebase-ios-sdk/raw/main/Crashlytics/upload-symbols)
+     and [run](https://github.com/firebase/firebase-ios-sdk/raw/main/Crashlytics/run).
      Note: please see the [discussion](https://github.com/firebase/firebase-ios-sdk/issues/4720#issuecomment-577213858)
      for details why it has to be done manually.
     - Put these in the directory where your `.xcodeproj` file lives, eg. `scripts/run` and `scripts/upload-symbols`

+ 1 - 1
Crashlytics/CHANGELOG.md

@@ -164,7 +164,7 @@
 
 This Firebase Crashlytics version includes the initial beta release of the Firebase Crashlytics SDK:
 
- - [feature] The SDK is now open-sourced. Take a look in our [GitHub repository](https://github.com/firebase/firebase-ios-sdk/tree/master/Crashlytics).
+ - [feature] The SDK is now open-sourced. Take a look in our [GitHub repository](https://github.com/firebase/firebase-ios-sdk/tree/main/Crashlytics).
  - [feature] Added support for Catalyst (note that Crashlytics still supports tvOS and macOS).
  - [feature] Added new APIs that are more consistent with other Firebase SDKs and more intuitive to use. The new APIs also give your users more control over how you collect their data.
  - [removed] Removed the Fabric API Key. Now, Crashlytics uses the GoogleService-Info.plist file to associate your app with your project. If you linked your app from Fabric and want to upgrade to the new SDK, remove the Fabric API key from your `run` and `upload-symbols` scripts. We also recommend removing the Fabric section from your app's Info.plist (when you upgrade, Crashlytics uses the new configuration you set up in Firebase).

+ 4 - 4
FirebaseAppDistributionInternal/README.md

@@ -1,12 +1,12 @@
 This library currently contains upcoming changes, and isn't meant to be used in production.
 
-It exists in `master` for CI purposes.
+It exists in `main` for CI purposes.
 
-## Steps to copy over changes in FirebaseAppDistributionInternal to master
+## Steps to copy over changes in FirebaseAppDistributionInternal to main
 
-For CI builds, this pod needs to be in master. To copy over changes, do the following:
+For CI builds, this pod needs to be in main. To copy over changes, do the following:
 
 1. `git checkout -b fad/appdistributioninternal`
 1. `git checkout fad/in-app-feedback FirebaseAppDistributionInternal/`
 
-Then open a PR to merge these changes to master. This won't affect the public version of `FirebaseAppDistribution`.
+Then open a PR to merge these changes to main. This won't affect the public version of `FirebaseAppDistribution`.

+ 1 - 1
FirebaseAuth/Sources/Backend/FIRAuthBackend.h

@@ -256,7 +256,7 @@ typedef void (^FIRGetRecaptchaConfigResponseCallback)(
     @brief Simple static class with methods representing the backend RPCs.
     @remarks All callback blocks passed as method parameters are invoked asynchronously on the
         global work queue in the future. See
-        https://github.com/firebase/firebase-ios-sdk/tree/master/FirebaseAuth/Docs/threading.md
+        https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseAuth/Docs/threading.md
  */
 @interface FIRAuthBackend : NSObject
 

+ 3 - 3
FirebaseCore/CHANGELOG.md

@@ -139,7 +139,7 @@
 - [fixed] Fixed platform availability checks in Swift Package Manager that may prevent code
   completion for Analytics APIs on macOS and tvOS. (#9032)
 - [added] Firebase now includes community supported Combine publishers. More details can be found
-  [here](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseCombineSwift/README.md). (#7295)
+  [here](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseCombineSwift/README.md). (#7295)
 
 # Firebase 8.9.0
 - [added] Firebase introduces beta support for tvOS, macOS, and Catalyst.
@@ -266,7 +266,7 @@
 
 # Firebase 6.31.0 FirebaseCore 6.10.1 -- M78
 - [added] Beta release of Swift Package Manager. Details
-  [here](https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md). (#3136)
+  [here](https://github.com/firebase/firebase-ios-sdk/blob/main/SwiftPackageManager.md). (#3136)
 - [changed] Firebase's dependencies on nanopb are updated from version 0.3.9.5 to
   version 0.3.9.6 (1.30906.0 in CocoaPods).
 
@@ -300,7 +300,7 @@
 - [fixed] Fixed Carthage installation failures involving `Protobuf.framework`.
   `Protobuf.framework` is now separately installable via adding
   `FirebaseProtobufBinary.json` to the Cartfile. Full details in the [Carthage usage
-  instructions](https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md#carthage-usage).
+  instructions](https://github.com/firebase/firebase-ios-sdk/blob/main/Carthage.md#carthage-usage).
   (#5276)
 
 # v6.6.6 -- M68

+ 1 - 1
FirebaseDynamicLinks/CHANGELOG.md

@@ -69,7 +69,7 @@
 - [fixed] Reduce frequency of iOS14 pasteboard notifications by only reading from it when it contains URL(s). (#5905)
 - [changed] Functionally neutral updated import references for dependencies. (#5824)
 
-Refer to the [README.md](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseDynamicLinks/README.md) for more details about this release.
+Refer to the [README.md](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseDynamicLinks/README.md) for more details about this release.
 
 # 4.1.0
 - [fixed] Fixing unwanted pending dynamic links checks on subsequent app restarts. (#5665)

+ 1 - 1
FirebaseInAppMessaging/Sources/DefaultUI/FIRCore+InAppMessagingDisplay.h

@@ -17,7 +17,7 @@
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
 // This file contains declarations that should go into FirebaseCore when
-// Firebase InAppMessagingDisplay is merged into master. Keep them separate now to help
+// Firebase InAppMessagingDisplay is merged into main. Keep them separate now to help
 // with build from development folder and avoid merge conflicts.
 
 extern FIRLoggerService kFIRLoggerInAppMessagingDisplay;

+ 1 - 1
FirebaseInAppMessaging/Sources/FIRCore+InAppMessaging.h

@@ -17,7 +17,7 @@
 #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
 
 // This file contains declarations that should go into FirebaseCore when
-// Firebase InAppMessaging is merged into master. Keep them separate now to help
+// Firebase InAppMessaging is merged into main. Keep them separate now to help
 // with build from development folder and avoid merge conflicts.
 
 // this should eventually be in FIRLogger.h

+ 1 - 1
FirebasePerformance/ProtoSupport/README.md

@@ -3,4 +3,4 @@ To build the protos:
 - Verify version in generate_protos.sh
 - `./generate_protos.sh`
 
-Make sure to [re-generate the project](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebasePerformance#to-develop-on-firebase-performance) after protos are built.
+Make sure to [re-generate the project](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebasePerformance#to-develop-on-firebase-performance) after protos are built.

+ 4 - 4
FirebasePerformance/Tests/TestApp/Source/ViewControllers/ScreenTracesViewController.m

@@ -39,11 +39,11 @@
 - (instancetype)initAndSetup {
   self = [super initWithNibName:nil bundle:nil];
   if (self) {
-    ScreenTracesTestScreensListViewController *masterView =
+    ScreenTracesTestScreensListViewController *mainView =
         [[ScreenTracesTestScreensListViewController alloc] initWithNibName:nil bundle:nil];
-    UINavigationController *masterNav =
-        [[UINavigationController alloc] initWithRootViewController:masterView];
-    self.viewControllers = @[ masterNav ];
+    UINavigationController *mainNav =
+        [[UINavigationController alloc] initWithRootViewController:mainView];
+    self.viewControllers = @[ mainNav ];
     self.delegate = self;
   }
   return self;

+ 2 - 2
FirebaseRemoteConfigSwift/CHANGELOG.md

@@ -20,6 +20,6 @@
 
 # 8.12.0-beta
 - Initial public beta release with Codable support. See example usage in
-  https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfigSwift/Tests/Codable.swift
+  https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseRemoteConfigSwift/Tests/Codable.swift
   and
-  https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfigSwift/Tests/Value.swift. (#6883)
+  https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseRemoteConfigSwift/Tests/Value.swift. (#6883)

+ 4 - 4
FirebaseRemoteConfigSwift/Tests/README.md

@@ -6,7 +6,7 @@ Currently the Remote Config tests run in two configurations:
 
 ## Remote Config Console API
 
-[`RemoteConfigConsole.swift`](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfigSwift/Tests/SwiftAPI/RemoteConfigConsole.swift)
+[`RemoteConfigConsole.swift`](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseRemoteConfigSwift/Tests/SwiftAPI/RemoteConfigConsole.swift)
 provides a simple API for interacting with an app's Remote Config on the
 Firebase console.
 
@@ -51,10 +51,10 @@ example.
 
 For the access token to be generated, the `GOOGLE_APPLICATION_CREDENTIALS` env var should be set to point to where the
 Firebase project's service account key is stored. This is set in the
-[`generate_access_token.sh`](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/generate_access_token.sh)
+[`generate_access_token.sh`](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/generate_access_token.sh)
 script.
 
 #### Remote Config API Tests
-There is a [section](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift#L210)
-of tests in [`APITests.swift`](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift)
+There is a [section](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift#L210)
+of tests in [`APITests.swift`](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseRemoteConfigSwift/Tests/SwiftAPI/APITests.swift)
 showcasing the  `RemoteConfigConsole` in action.

+ 1 - 1
Firestore/CHANGELOG.md

@@ -465,7 +465,7 @@
 - [changed] Firestore no longer bundles a copy of the gRPC certificates, now
   that the gRPC-C++ CocoaPod includes them. CocoaPods users should be updated
   automatically. Carthage users should follow the [updated
-  instructions](https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md)
+  instructions](https://github.com/firebase/firebase-ios-sdk/blob/main/Carthage.md)
   to get `gRPCCertificates.bundle` from the correct location.
 
 # 0.16.1

+ 12 - 12
Firestore/core/test/unit/FSTGoogleTestTests.mm

@@ -333,11 +333,11 @@ XCTestSuite* CreateAllTestsTestSuite() {
   [allTestsSuite
       addTest:[XCTestSuite testSuiteForTestCaseClass:[GoogleTests class]]];
 
-  const testing::UnitTest* master = testing::UnitTest::GetInstance();
+  const testing::UnitTest* main = testing::UnitTest::GetInstance();
 
-  int testCases = master->total_test_case_count();
+  int testCases = main->total_test_case_count();
   for (int i = 0; i < testCases; i++) {
-    const testing::TestCase* testCase = master->GetTestCase(i);
+    const testing::TestCase* testCase = main->GetTestCase(i);
     NSString* testCaseName = ClassNameForTestCase(testCase);
     Class testClass = objc_getClass([testCaseName UTF8String]);
     [allTestsSuite addTest:[XCTestSuite testSuiteForTestCaseClass:testClass]];
@@ -351,11 +351,11 @@ XCTestSuite* CreateAllTestsTestSuite() {
  * current test invocation.
  */
 void CreateGoogleTestTests() {
-  NSString* masterTestCaseName = NSStringFromClass([GoogleTests class]);
+  NSString* mainTestCaseName = NSStringFromClass([GoogleTests class]);
 
   // Initialize GoogleTest but don't run the tests yet.
   int argc = 1;
-  const char* argv[] = {[masterTestCaseName UTF8String]};
+  const char* argv[] = {[mainTestCaseName UTF8String]};
   testing::InitGoogleTest(&argc, const_cast<char**>(argv));
 
   // Convert XCTest's testToRun set to the equivalent --gtest_filter flag.
@@ -363,7 +363,7 @@ void CreateGoogleTestTests() {
   // Note that we only set forceAllTests to true if the user specifically
   // focused on GoogleTests. This prevents XCTest double-counting test cases
   // (and failures) when a user asks for all tests.
-  NSSet<NSString*>* allTests = [NSSet setWithObject:masterTestCaseName];
+  NSSet<NSString*>* allTests = [NSSet setWithObject:mainTestCaseName];
   NSSet<NSString*>* testsToRun = LoadXCTestConfigurationTestsToRun();
   if (testsToRun) {
     if ([allTests isEqual:testsToRun]) {
@@ -379,13 +379,13 @@ void CreateGoogleTestTests() {
   }
 
   // Create XCTestCases and populate the testInfosByKey map
-  const testing::UnitTest* master = testing::UnitTest::GetInstance();
+  const testing::UnitTest* main = testing::UnitTest::GetInstance();
   NSMutableDictionary<NSString*, NSValue*>* infoMap =
-      [NSMutableDictionary dictionaryWithCapacity:master->total_test_count()];
+      [NSMutableDictionary dictionaryWithCapacity:main->total_test_count()];
 
-  int testCases = master->total_test_case_count();
+  int testCases = main->total_test_case_count();
   for (int i = 0; i < testCases; i++) {
-    const testing::TestCase* testCase = master->GetTestCase(i);
+    const testing::TestCase* testCase = main->GetTestCase(i);
     CreateXCTestCaseClass(testCase, infoMap);
   }
   testInfosByKey = infoMap;
@@ -425,8 +425,8 @@ void RunGoogleTestTests() {
 - (void)testGoogleTestsActuallyRun {
   // This whole mechanism is sufficiently tricky that we should verify that the
   // build actually plumbed this together correctly.
-  const testing::UnitTest* master = testing::UnitTest::GetInstance();
-  XCTAssertGreaterThan(master->total_test_case_count(), 0);
+  const testing::UnitTest* main = testing::UnitTest::GetInstance();
+  XCTAssertGreaterThan(main->total_test_case_count(), 0);
 }
 
 @end

+ 3 - 3
README.md

@@ -62,8 +62,8 @@ source snapshot or unreleased branch, use Podfile directives like the following:
 
 To access FirebaseFirestore via a branch:
 ```ruby
-pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
-pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
+pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'main'
+pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'main'
 ```
 
 To access FirebaseMessaging via a checked-out version of the firebase-ios-sdk repo:
@@ -146,7 +146,7 @@ For information about managing headers and imports, see [HeadersImports](Headers
 ### Code Formatting
 
 To ensure that the code is formatted consistently, run the script
-[./scripts/check.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check.sh)
+[./scripts/check.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check.sh)
 before creating a pull request (PR).
 
 GitHub Actions will verify that any code changes are done in a style-compliant

+ 6 - 6
ROADMAP.md

@@ -27,20 +27,20 @@ code to the Firebase repo.
 Thanks in large part to community contributions, we already have several Swift
 improvements:
 * Analytics
-  * Enabling [SwiftUI Screen tracking](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseAnalyticsSwift/CHANGELOG.md)
+  * Enabling [SwiftUI Screen tracking](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseAnalyticsSwift/CHANGELOG.md)
    automated view logging for SwiftUI apps
 * Firestore and RTDB
   * Codable Support ([Firestore](https://github.com/firebase/firebase-ios-sdk/pull/3198),
-   [Database](https://github.com/firebase/firebase-ios-sdk/tree/master/FirebaseDatabaseSwift/Sources/Codable))
+   [Database](https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseDatabaseSwift/Sources/Codable))
    eliminated manual data processing
   * [Property wrappers](https://github.com/firebase/firebase-ios-sdk/pull/8408) for Firestore collections dramatically simplified client coding
 * Storage
   * Eliminated impossible states, provided new and improved async API usage via
-   [Result type](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseStorage/CHANGELOG.md)
-   and [async/await](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseStorage/CHANGELOG.md)
+   [Result type](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/CHANGELOG.md)
+   and [async/await](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/CHANGELOG.md)
    additions
 * ML Model Downloader
-  * Full [SDK implementation in Swift](https://github.com/firebase/firebase-ios-sdk/tree/master/FirebaseMLModelDownloader/Sources)
+  * Full [SDK implementation in Swift](https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseMLModelDownloader/Sources)
 * In App Messaging
   * Vastly simplified usage from SwiftUI with
    [SwiftUI modifiers](https://github.com/firebase/firebase-ios-sdk/pull/7496) to show messages and
@@ -80,7 +80,7 @@ Evaluate impact on Firebase APIs of the
 For example, Objective-C callback APIs that return a value do not get an
 async/await API automatically generated and an explicit function may need to be
 added. See these
-[Firebase Storage examples](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseStorage/Sources/AsyncAwait.swift).
+[Firebase Storage examples](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/Sources/AsyncAwait.swift).
 
 ### Combine
 

+ 1 - 1
ReleaseTooling/Sources/FirebaseReleaser/InitializeRelease.swift

@@ -35,7 +35,7 @@ enum InitializeRelease {
     let versionParts = version.split(separator: ".")
     let minorVersion = "\(versionParts[0]).\(versionParts[1])"
     let branch = "version-\(minorVersion)"
-    Shell.executeCommand("git checkout master", workingDir: path)
+    Shell.executeCommand("git checkout main", workingDir: path)
     Shell.executeCommand("git pull", workingDir: path)
     Shell.executeCommand("git checkout -b \(branch)", workingDir: path)
     return branch

+ 1 - 1
ReleaseTooling/Template/README.md

@@ -93,5 +93,5 @@ You can get samples for Firebase from https://github.com/firebase/quickstart-ios
 Note that several of the samples depend on SDKs that are not included with
 this archive; for example, FirebaseUI. For the samples that depend on SDKs not
 included in this archive, you'll need to use CocoaPods or use the
-[ZipBuilder](https://github.com/firebase/firebase-ios-sdk/tree/master/ReleaseTooling)
+[ZipBuilder](https://github.com/firebase/firebase-ios-sdk/tree/main/ReleaseTooling)
 to create your own custom binary frameworks.

+ 1 - 1
ReleaseTooling/ZipBuilderV2Plan.md

@@ -3,7 +3,7 @@ of source and binary CocoaPods.
 
 ## Introduction
 
-The current [Zip Builder](https://github.com/firebase/firebase-ios-sdk/tree/master/ZipBuilder)
+The current [Zip Builder](https://github.com/firebase/firebase-ios-sdk/tree/main/ZipBuilder)
 is Firebase specific. This is a proposal and initial plan to evolve the Zip Builder into a
 multi-purpose Apple binary framework creation tool.
 

+ 1 - 1
ReleaseTooling/ZipBuilderV3Plan.md

@@ -5,7 +5,7 @@ other SDK distributors to use the binary building tool.
 
 ## Introduction
 
-The current [Zip Builder](https://github.com/firebase/firebase-ios-sdk/tree/master/ZipBuilder)
+The current [Zip Builder](https://github.com/firebase/firebase-ios-sdk/tree/main/ZipBuilder)
 is Firebase specific. This is a proposal and initial plan to evolve the Zip Builder into a
 multi-purpose Apple binary framework creation tool.
 

+ 1 - 1
SwiftDashboard.md

@@ -38,7 +38,7 @@ tasks for additional Swift improvements.
 * **API Tests**: Tests exist for all Swift APIs. Integration tests are preferred, but compile-only tests are acceptable.
 * **async/await**:API tests include tests for all auto-generated async/await APIs. Implementations are added for
 asynchronous APIs that don't have auto-generated counterparts like
-[these](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift)
+[these](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseStorage/Tests/Integration/StorageAsyncAwait.swift)
 for Storage.
 * **Swift Errors**: Swift Error Codes are available instead of NSErrors.
 * **Codable**: Codable is implemented where appropriate.

+ 17 - 17
docs/ContinuousIntegration.md

@@ -1,7 +1,7 @@
 # Firebase Apple SDK Continuous Integration
 
 Firebase uses [several GitHub Action
-workflows](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/actions/)
+workflows](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/actions/)
 for product testing.
 
 There are two types of tests:
@@ -13,7 +13,7 @@ Presubmit tests are also scheduled to run overnight, independent of PRs.
 ## Organization
 
 Each Firebase product has a corresponding
-[workflow](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows). There
+[workflow](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows). There
 are several other workflows primarily for productization and packaging specific testing.
 
 ### Product Testing
@@ -44,25 +44,25 @@ Tests that only run in the nightly cron run. This is typically the `--static-fra
 configuration that rarely breaks if dynamic frameworks are working.
 
 ### Style Tests
-[check.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/check.yml)
+[check.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/check.yml)
 
 Runs several coding style tests. Details
-[here](https://github.com/firebase/firebase-ios-sdk/tree/master/scripts/README.md#checksh).
+[here](https://github.com/firebase/firebase-ios-sdk/tree/main/scripts/README.md#checksh).
 
 ### SwiftPM Tests
-[spm.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/spm.yml)
+[spm.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/spm.yml)
 
 Build and run Firebase-wide tests with Swift Package Manager.
 
 ### Zip Distribution Testing
-[zip.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/zip.yml)
+[zip.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/zip.yml)
 
-Builds the zip distribution both from the tip of `master` and the current staged release distribution.
+Builds the zip distribution both from the tip of `main` and the current staged release distribution.
 The resulting distribution is then used to build and test several Firebase
 [QuickStarts](https://github.com/firebase/quickstart-ios).
 
 ### Release testing
-[scripts/create_spec_repo](https://github.com/firebase/firebase-ios-sdk/tree/master//scripts/create_spec_repo)
+[scripts/create_spec_repo](https://github.com/firebase/firebase-ios-sdk/tree/main//scripts/create_spec_repo)
 
 Release testing is to build up a testing podspecs (CocoaPods podspecs) candidate and test building
 up a quickstart with CocoaPods. If this candidate is successfully built, that means tests in
@@ -72,27 +72,27 @@ candidate.
 Currently we have two workflows running nightly to test podspecs:
 
 #### Release workflow
-[release.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/release.yml)
+[release.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/release.yml)
 
 The release workflow is to test podspecs corresponding to the latest release tag in the repo, and
 create a CocoaPods spec testing repo. Podspecs in this testing repo
 will have tags `Cocoapods-X.Y.Z`. This is to mimic a real released candidate.
 
 #### Prerelease workflow
-[prerelease.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/prerelease.yml)
+[prerelease.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/prerelease.yml)
 
-The prerelease workflow is to test podspecs on the `master` branch, and create a testing repo. This is
+The prerelease workflow is to test podspecs on the `main` branch, and create a testing repo. This is
 to make sure podspecs are releasable, which means podspecs in the head can pass all tests and build
 up a candidate.
 
 #### SpecTesting workflow
-[spectesting.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/spectesting.yml)
+[spectesting.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/spectesting.yml)
 
 Runs product-specific `pod spec lint` presubmit testing leveraging the https://github.com/firebase/SpecsTesting
 repo.
 
 ### `pod spec lint` testing
-[scripts/create_spec_repo](https://github.com/firebase/firebase-ios-sdk/tree/master/scripts/create_spec_repo)
+[scripts/create_spec_repo](https://github.com/firebase/firebase-ios-sdk/tree/main/scripts/create_spec_repo)
 
 The previous setup will run podspecs testing nightly. This enables presubmits of pod spec lint
 podspecs and accelerates the testing process. This is to run presubmit tests for Firebase Apple SDKs
@@ -100,7 +100,7 @@ in the SDK repo. A job to run `pod spec lint` is added to SDK testing workflows,
 Analytics, Auth, Core, Crashlytics, Database, DynamicLinks, Firestore, Functions, GoogleUtilities,
 InAppMessaging, Installations, Messaging, MLModelDownloader, Performance, RemoteConfig and Storage.
 These jobs will be triggered in presubmit and run pod spec lint with a source of
-Firebase/SpecsTesting repo, which is updated to the head of master nightly in the prerelease
+Firebase/SpecsTesting repo, which is updated to the head of main nightly in the prerelease
 workflow.
 
 When these PRs are merged, then changed podspecs will be pod repo push to the Firebase/SpecsTesting
@@ -108,13 +108,13 @@ repo, through `update_SpecTesting_repo` job in the prerelease workflow, to make
 repo is up-to-date.
 
 ### Daily Test Status Notification
-[generate_issues.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/generate_issues.yml)
+[generate_issues.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/generate_issues.yml)
 
 Generates a testing report for all nightly jobs, like #7797, so developers from the iOS SDK repo do
 not have to go through workflows to get all results.
 
 ### Code coverage
-[test_coverage.yml](https://github.com/firebase/firebase-ios-sdk/tree/master/.github/workflows/test_coverage.yml)
+[test_coverage.yml](https://github.com/firebase/firebase-ios-sdk/tree/main/.github/workflows/test_coverage.yml)
 
 Generates code coverage reports in PRs (see
 [example](https://github.com/firebase/firebase-ios-sdk/pull/7788#issuecomment-807690514)).
@@ -124,4 +124,4 @@ code coverage data. These bundles will be gathered in the last job and generate
 will be sent to the Metrics Service, which will create a code coverage report in a PR. Currently
 code coverage can generate diff between commits. Incremental code coverage support is in progress.
 Details
-[here](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/health-metrics-presubmit.yml#L417).
+[here](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/health-metrics-presubmit.yml#L417).

+ 1 - 1
docs/FirebaseOptionsPerProduct.md

@@ -16,7 +16,7 @@ Summarize which Firebase Options fields (and GoogleService-Info.plist attributes
 
 
 ## Rows (FirebaseOptions)
-See [FIROptions.m](https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseCore/Sources/FIROptions.m) to see how the variables map
+See [FIROptions.m](https://github.com/firebase/firebase-ios-sdk/blob/main/FirebaseCore/Sources/FIROptions.m) to see how the variables map
 to GoogleService-Info.plist attributes.
 
 * *apiKey*: An API key used for authenticating requests from your Apple app

+ 54 - 54
scripts/README.md

@@ -3,215 +3,215 @@
 This directory provides a set of scripts for development, test, and continuous
 integration of the Firebase Apple SDKs.
 
-## [check.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check.sh)
+## [check.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check.sh)
 
 Used by the
-[check CI workflow](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/check.yml)
+[check CI workflow](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/check.yml)
 to run several static analysis checks. It calls the following scripts:
 
-### [style.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/style.sh)
+### [style.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/style.sh)
 
 Runs clang-format and swiftformat across the repo.
 
-### [check_whitespace.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_whitespace.sh)
+### [check_whitespace.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_whitespace.sh)
 
 Verify there are no files with trailing whitespace.
 
-### [check_filename_spaces.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_filename_spaces.sh)
+### [check_filename_spaces.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_filename_spaces.sh)
 
 Spaces in filenames are not allowed.
 
-### [check_copyright.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_copyright.sh)
+### [check_copyright.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_copyright.sh)
 
 Verify existence and format of copyrights.
 
-### [check_test_inclusion.py](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_test_inclusion.py)
+### [check_test_inclusion.py](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_test_inclusion.py)
 
 Test existence check for the internal Firestore Xcode project.
 
-### [check_imports.swift](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_imports.swift)
+### [check_imports.swift](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_imports.swift)
 
 Verify import style complies with
-[repo standards](https://github.com/firebase/firebase-ios-sdk/blob/master/HeadersImports.md).
+[repo standards](https://github.com/firebase/firebase-ios-sdk/blob/main/HeadersImports.md).
 
-### [check_firestore_core_api_absl.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_firestore_core_api_absl.sh)
+### [check_firestore_core_api_absl.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_firestore_core_api_absl.sh)
 
 Check Firestore `absl` usages for g3 build issues.
 
-### [check_lint.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_lint.sh)
+### [check_lint.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_lint.sh)
 
 Run cpplint.
 
-### [sync_project.rb](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/sync_project.rb)
+### [sync_project.rb](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/sync_project.rb)
 
 Used by Firestore to to keep the Xcode project in sync after adding/removing tests.
 
 ## Other Scripts
-### [binary_to_array.py](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/binary_to_array.py)
+### [binary_to_array.py](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/binary_to_array.py)
 
 Firestore script to convert binary data into a C/C++ array.
 
-### [build.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/build.sh)
+### [build.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/build.sh)
 
 Script used by CI jobs to wrap xcodebuild invocations with options.
 
-### [build_non_firebase_sdks.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/build.sh)
+### [build_non_firebase_sdks.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/build.sh)
 
 CI script to build binary versions of non-Firebase SDKs for QuickStart testing.
 
-### [build_zip.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/build_zip.sh)
+### [build_zip.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/build_zip.sh)
 
 CI script for building the zip distribution.
 
-### [buildcache.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/buildcache.sh)
+### [buildcache.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/buildcache.sh)
 
 Clang options for the buildcache GitHub action.
 
-### [change_headers.swift](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/change_headers.swift)
+### [change_headers.swift](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/change_headers.swift)
 
 Utility script to update source to repo-relative headers.
 
-### [check_secrets.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check_secrets.sh)
+### [check_secrets.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/check_secrets.sh)
 
 CI script to test if secrets are available (not running on a fork).
 
-### [collect_metrics.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/collect_metrics.sh)
+### [collect_metrics.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/collect_metrics.sh)
 
 CI script to collect project health metrics and upload them to a database.
 
-### [configure_test_keychain.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/configure_test_keychain.sh)
+### [configure_test_keychain.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/configure_test_keychain.sh)
 
 CI script to setup the keychain for macOS and Catalyst testing.
 
-### [cpplint.py](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/cpplint.py)
+### [cpplint.py](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/cpplint.py)
 
 Firestore script for C++ linting.
 
-### [create_pull_request.rb](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/create_pull_request.rb)
+### [create_pull_request.rb](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/create_pull_request.rb)
 
 Utility used by CI scripts to create issues and PRs.
 
-### [decrypt_gha_secret.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/decrypt_gha_secret.sh)
+### [decrypt_gha_secret.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/decrypt_gha_secret.sh)
 
 CI script to decrypt a GitHub Actions secret.
 
-### [encrypt_gha_secret.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/encrypt_gha_secret.sh)
+### [encrypt_gha_secret.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/encrypt_gha_secret.sh)
 
 CI script to encrypt a GitHub Actions secret.
 
-### [fuzzing_ci.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/fuzzing_ci.sh)
+### [fuzzing_ci.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/fuzzing_ci.sh)
 
 Firestore CI script to run fuzz testing.
 
-### [generate_access_token.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/generate_access_token.sh)
+### [generate_access_token.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/generate_access_token.sh)
 
 Script to generate a Firebase access token used by Remote config integration tests.
 
-### [install_prereqs.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scriptsinstall_prereqs.sh)
+### [install_prereqs.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scriptsinstall_prereqs.sh)
 
 Utility CI script to provide configuration for build.sh
 
-### [localize_podfile.swift](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/localize_podfile.swift)
+### [localize_podfile.swift](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/localize_podfile.swift)
 
 Utility script to update a Podfile to point to local podspecs.
 
-### [make_release_notes.py](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/make_release_notes.py)
+### [make_release_notes.py](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/make_release_notes.py)
 
 Converts GitHub-flavored markdown changelogs to devsite-compatible release notes.
 
-### [pod_lib_lint.rb](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/pod_lib_lint.rb)
+### [pod_lib_lint.rb](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/pod_lib_lint.rb)
 
 Wrapper script for running `pod lib lint` tests to include dependencies from the monorepo.
 
-### [release_testing_setup.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/release_testing_setup.sh)
+### [release_testing_setup.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/release_testing_setup.sh)
 
 Utility script for the release workflow.
 
-### [remove_data.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/remove_data.sh)
+### [remove_data.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/remove_data.sh)
 
 Cleanup script for CI workflows.
 
-### [run_database_emulator.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/run_database_emulator.sh)
+### [run_database_emulator.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/run_database_emulator.sh)
 
 Run the RTDB emulator.
 
-### [run_firestore_emulator.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/run_firestore_emulator.sh)
+### [run_firestore_emulator.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/run_firestore_emulator.sh)
 
 Run the Firestore emulator.
 
-### [setup_bundler.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/setup_bundler.sh)
+### [setup_bundler.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/setup_bundler.sh)
 
 Set up the Ruby bundler.
 
-### [setup_check.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/setup_check.sh)
+### [setup_check.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/setup_check.sh)
 
 Install tooling for the check workflow.
 
-### [setup_quickstart.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/setup_quickstart.sh)
+### [setup_quickstart.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/setup_quickstart.sh)
 
 Set up a QuickStart for integration testing.
 
-### [setup_quickstart_framework.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/setup_quickstart_framework.sh)
+### [setup_quickstart_framework.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/setup_quickstart_framework.sh)
 
 Set up a QuickStart for zip distribution testing.
 
-### [setup_spm_tests.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/setup_spm_tests.sh)
+### [setup_spm_tests.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/setup_spm_tests.sh)
 
 Configuration for SPM testing.
 
-### [spm_test_schemes/](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/spm_test_schemes)
+### [spm_test_schemes/](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/spm_test_schemes)
 
 Schemes used by above script to enable test target schemes.
 
-### [test_archiving.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/test_archiving.sh)
+### [test_archiving.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/test_archiving.sh)
 
 Test Xcode Archive build.
 
-### [test_catalyst.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/test_catalyst.sh)
+### [test_catalyst.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/test_catalyst.sh)
 
 Test catalyst build.
 
-### [test_quickstart.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/test_quickstart.sh)
+### [test_quickstart.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/test_quickstart.sh)
 
 Test QuickStart.
 
-### [test_quickstart_framework.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/test_quickstart_framework.sh)
+### [test_quickstart_framework.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/test_quickstart_framework.sh)
 
 Test QuickStart with the zip distribution.
 
-### [update_xcode_target.rb](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/update_xcode_target.rb)
+### [update_xcode_target.rb](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/update_xcode_target.rb)
 
 Script to add a file to an Xcode target.
 
-### [xcresult_logs.py](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/xcresult_logs.py)
+### [xcresult_logs.py](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/xcresult_logs.py)
 
 Tooling used by `build.sh` to get the log output for an `xcodebuild` invocation.
 
-### [zip_quickstart_test.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/zip_quickstart_test.sh)
+### [zip_quickstart_test.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/zip_quickstart_test.sh)
 
 Run the tests associated with a QuickStart with a zip distribution.
 
 ## Script Subdirectories
-### [create_spec_repo](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/create_spec_repo)
+### [create_spec_repo](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/create_spec_repo)
 
 Swift utility to build a podspec repo.
 
-### [gha-encrypted](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/gha-encrypted)
+### [gha-encrypted](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/gha-encrypted)
 
 Store for GitHub secret encrypted resources.
 
-### [health_metrics](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/health_metrics)
+### [health_metrics](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/health_metrics)
 
 Code coverage and binary size tooling.
 
-### [lib](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/lib)
+### [lib](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/lib)
 
 Support libraries for `xcresult_logs.py`.
 
-### [lldb](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/lldb)
+### [lldb](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/lldb)
 
 Firestore utilities.
 
-### [third_party](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/third_party)
+### [third_party](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/third_party)
 
 Use Travis's MIT licensed retry.sh script.

+ 18 - 18
scripts/check.sh

@@ -22,7 +22,7 @@ function usage() {
 USAGE: scripts/check.sh [--allow-dirty] [--commit] [<revision>]
 
 Runs auto-formatting scripts, source-tree checks, and linters on any files that
-have changed since origin/master.
+have changed since origin/main.
 
 By default, any changes are left as uncommited changes in the working tree. You
 can review them with git diff. Pass --commit to automatically commit any changes.
@@ -50,18 +50,18 @@ OPTIONS:
     Run all checks without making any changes to local files.
 
   <revision>
-    Specifies a starting revision other than the default of origin/master.
+    Specifies a starting revision other than the default of origin/main.
 
 
 EXAMPLES:
 
   check.sh
     Runs automated checks and formatters on all changed files since
-    origin/master. Check for changes with git diff.
+    origin/main. Check for changes with git diff.
 
   check.sh --commit
     Runs automated checks and formatters on all changed files since
-    origin/master and commits the results.
+    origin/main and commits the results.
 
   check.sh --amend HEAD
     Runs automated checks and formatters on all changed files since the last
@@ -84,7 +84,7 @@ cd "${top_dir}"
 ALLOW_DIRTY=false
 COMMIT_METHOD="none"
 CHECK_DIFF=true
-START_REVISION="origin/master"
+START_REVISION="origin/main"
 TEST_ONLY=false
 VERBOSE=false
 
@@ -94,19 +94,19 @@ if [[ ! -t 1 ]]; then
 fi
 
 # When travis clones a repo for building, it uses a shallow clone. After the
-# first commit on a non-master branch, TRAVIS_COMMIT_RANGE is not set, master
+# first commit on a non-main branch, TRAVIS_COMMIT_RANGE is not set, main
 # is not available and we need to compute the START_REVISION from the common
-# ancestor of $TRAVIS_COMMIT and origin/master.
+# ancestor of $TRAVIS_COMMIT and origin/main.
 if [[ -n "${TRAVIS_COMMIT_RANGE:-}" ]] ; then
   CHECK_DIFF=true
   START_REVISION="$TRAVIS_COMMIT_RANGE"
 elif [[ -n "${TRAVIS_COMMIT:-}" ]] ; then
-  if ! git rev-parse origin/master >& /dev/null; then
-    git remote set-branches --add origin master
+  if ! git rev-parse origin/main >& /dev/null; then
+    git remote set-branches --add origin main
     git fetch origin
   fi
   CHECK_DIFF=true
-  START_REVISION=$(git merge-base origin/master "${TRAVIS_COMMIT}")
+  START_REVISION=$(git merge-base origin/main "${TRAVIS_COMMIT}")
 fi
 
 while [[ $# -gt 0 ]]; do
@@ -183,29 +183,29 @@ if [[ "${START_REVISION}" == *..* ]]; then
   RANGE_START="${START_REVISION/..*/}"
   RANGE_END="${START_REVISION/*../}"
 
-  # Figure out if we have access to master. If not add it to the repo.
-  if ! git rev-parse origin/master >& /dev/null; then
-    git remote set-branches --add origin master
+  # Figure out if we have access to main. If not add it to the repo.
+  if ! git rev-parse origin/main >& /dev/null; then
+    git remote set-branches --add origin main
     git fetch origin
   fi
 
   # Try to come up with a more accurate representation of the merge, so that
-  # checks will operate on just the differences the PR would merge into master.
+  # checks will operate on just the differences the PR would merge into main.
   # The start of the revision range that Travis supplies can sometimes be a
   # seemingly random value.
-  NEW_RANGE_START=$(git merge-base origin/master "${RANGE_END}" || echo "")
+  NEW_RANGE_START=$(git merge-base origin/main "${RANGE_END}" || echo "")
   if [[ -n "$NEW_RANGE_START" ]]; then
     START_REVISION="${NEW_RANGE_START}..${RANGE_END}"
     START_SHA="${START_REVISION}"
   else
     # In the shallow clone that Travis has created there's no merge base
-    # between the PR and master. In this case just fall back on checking
+    # between the PR and main. In this case just fall back on checking
     # everything.
     echo "Unable to detect base commit for change detection."
     echo "Falling back on just checking everything."
     CHECK_DIFF=false
-    START_REVISION="origin/master"
-    START_SHA="origin/master"
+    START_REVISION="origin/main"
+    START_SHA="origin/main"
   fi
 
 else

+ 1 - 1
scripts/check_imports.swift

@@ -18,7 +18,7 @@
 // Utility script for verifying `import` and `include` syntax. This ensures a
 // consistent style as well as functionality across multiple package managers.
 
-// For more context, see https://github.com/firebase/firebase-ios-sdk/blob/master/HeadersImports.md.
+// For more context, see https://github.com/firebase/firebase-ios-sdk/blob/main/HeadersImports.md.
 
 import Foundation
 

+ 1 - 1
scripts/check_lint.py

@@ -82,7 +82,7 @@ def main():
   parser.add_argument('rev_or_files', nargs='*',
                       help='A single revision that specifies a point in time '
                            'from which to look for changes. Defaults to '
-                           'origin/master. Alternatively, a list of specific '
+                           'origin/main. Alternatively, a list of specific '
                            'files or git pathspecs to lint.')
   args = command_trace.parse_args(parser)
 

+ 3 - 3
scripts/check_secrets.sh

@@ -32,9 +32,9 @@ check_secrets()
   fi
   # GitHub Actions: Secrets are available if we're not running on a fork.
   # See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-environment-variables
-  # TODO- Both GITHUB_BASE_REF and GITHUB_HEAD_REF are set in master repo
-  # PRs even thought the docs say otherwise. They are not set in cron jobs on master.
-  # Investigate how do to distinguish fork PRs from master repo PRs.
+  # TODO- Both GITHUB_BASE_REF and GITHUB_HEAD_REF are set in main repo
+  # PRs even thought the docs say otherwise. They are not set in cron jobs on main.
+  # Investigate how do to distinguish fork PRs from main repo PRs.
   if [[ -n "${GITHUB_WORKFLOW:-}" ]]; then
     return 0
   fi

+ 1 - 1
scripts/create_pull_request.rb

@@ -58,7 +58,7 @@ def generate_pr_for_target_changes(repo_root:, target_path:)
   end
   system("cd #{REPO_ROOT}\ngit checkout -b #{BASE_BRANCH}\ngit add #{TARGET_PATH}\ngit commit -m \"#{COMMIT_COMMENT}\"\ngit push -u origin #{BASE_BRANCH}")
   client = Octokit::Client.new(access_token: ACCESS_TOKEN)
-  client.create_pull_request("firebase/firebase-ios-sdk", "master", BASE_BRANCH, PR_TITLE, PR_BODY)
+  client.create_pull_request("firebase/firebase-ios-sdk", "main", BASE_BRANCH, PR_TITLE, PR_BODY)
 end
 
 

+ 6 - 6
scripts/create_spec_repo/README.md

@@ -9,15 +9,15 @@ with sources of
 - https://cdn.cocoapods.org/
 
 where [SpecsTesting](https://github.com/firebase/SpecsTesting) is generated from the head of the
-master branch of [firebase-ios-sdk repo](https://github.com/firebase/firebase-ios-sdk).
+main branch of [firebase-ios-sdk repo](https://github.com/firebase/firebase-ios-sdk).
 
-The [prerelease workflow](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/prerelease.yml#L11-L46)
+The [prerelease workflow](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/prerelease.yml#L11-L46)
 will update the [SpecsTesting repo](https://github.com/firebase/SpecsTesting) nightly from the
-head of the master branch.
+head of the main branch.
 In order to let presubmit tests run on the latest podspec repo, [SpecsTesting repo](https://github.com/firebase/SpecsTesting)
 will be updated when a PR with changed podspecs is merged.
 When this PR is merged, changed podspecs will be `pod repo push`ed to the podspec repo in
-[postsubmit tests](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/prerelease.yml#L48-L94).
+[postsubmit tests](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/prerelease.yml#L48-L94).
 
 Since `pod spec lint` will test podspecs with remote sources. One PR with changes on multiple
 podspecs are not encouraged. Changes with multiple podspecs, including their dependencies, might
@@ -46,6 +46,6 @@ job in presubmit.
 
 ```
 
-Once a PR is merged, [`update_SpecsTesting_repo` job](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/prerelease.yml#L48)
-in the [prerelease workflow](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/prerelease.yml)
+Once a PR is merged, [`update_SpecsTesting_repo` job](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/prerelease.yml#L48)
+in the [prerelease workflow](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/prerelease.yml)
 will automatically `pod repo push` changed podspecs in postsubmits,

+ 7 - 7
scripts/health_metrics/README.md

@@ -3,18 +3,18 @@ This directory includes code coverage report generation and binary size report g
 
 ## Code Coverage Report Generation
 
-This tool is to help generate coverage reports for pull requests. It's defined by the [test_coverage  workflow](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/health_metrics/file_patterns.json).
+This tool is to help generate coverage reports for pull requests. It's defined by the [test_coverage  workflow](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/health_metrics/file_patterns.json).
 
 Coverage reports of SDK frameworks will be displayed in a pull request if the change is under corresponding SDK file patterns.
 
-[UpdatedFilesCollector](https://github.com/firebase/firebase-ios-sdk/tree/master/scripts/health_metrics/generate_code_coverage_report/Sources/UpdatedFilesCollector) will detect file changes and compare file paths to file patterns in [file_patterns.json](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/health_metrics/file_patterns.json). If updated file paths fit any patterns, corresponding SDK coverage job will be triggered.
+[UpdatedFilesCollector](https://github.com/firebase/firebase-ios-sdk/tree/main/scripts/health_metrics/generate_code_coverage_report/Sources/UpdatedFilesCollector) will detect file changes and compare file paths to file patterns in [file_patterns.json](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/health_metrics/file_patterns.json). If updated file paths fit any patterns, corresponding SDK coverage job will be triggered.
 
 ### Add a new coverage workflow
 
 To create a code coverage workflow for a new SDK,
-1. Add `newsdk` and its patterns in [file_patterns.json](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/health_metrics/file_patterns.json).
+1. Add `newsdk` and its patterns in [file_patterns.json](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/health_metrics/file_patterns.json).
 2. Add a new output flag, e.g. `newsdk_run_job`, in the [coverage workflow](https://github.com/firebase/firebase-ios-sdk/blob/64d50a7f7b3af104a88f9c9203285ae20ea309d4/.github/workflows/test_coverage.yml#L17). `newsdk_run_job` should be aligned with the name of SDK `newsdk` in file_patterns.json.
-3. Add a newsdk coverage job in the [workflow](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/test_coverage.yml):
+3. Add a newsdk coverage job in the [workflow](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/test_coverage.yml):
 ```
 pod-lib-lint-newsdk:
     needs: check
@@ -45,8 +45,8 @@ Add the job name to the [`needs` of `create_report` job](https://github.com/fire
 ## Binary Size Report Generation
 
 This tool is to generate a report for SDK binary sizes.
-[create_binary_size_report.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/health_metrics/create_binary_size_report.sh)
-will trigger [BinarySizeReportGenerator](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/health_metrics/generate_code_coverage_report/Sources/BinarySizeReportGenerator/BinarySizeReportGeneration.swift)
+[create_binary_size_report.sh](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/health_metrics/create_binary_size_report.sh)
+will trigger [BinarySizeReportGenerator](https://github.com/firebase/firebase-ios-sdk/blob/main/scripts/health_metrics/generate_code_coverage_report/Sources/BinarySizeReportGenerator/BinarySizeReportGeneration.swift)
 which will run [cocoapods-size](https://github.com/google/cocoapods-size)
 to create a binary size report and either post it in PRs in presubmits or
 upload it to the Metrics Service.
@@ -67,7 +67,7 @@ python3 measure_cocoapod_size.py --cocoapods FirebaseABTesting
 
 ### Environment Setup
 
-The `binary_size_metrics` on GitHub Actions [workflow](https://github.com/firebase/firebase-ios-sdk/blob/master/.github/workflows/health-metrics-presubmit.yml)
+The `binary_size_metrics` on GitHub Actions [workflow](https://github.com/firebase/firebase-ios-sdk/blob/main/.github/workflows/health-metrics-presubmit.yml)
 is running binary size measurement presubmits and postsubmits. The environment for this job
 could be found in `runs-on`. More details about the envionment could be found [here](https://github.com/actions/virtual-environments#available-environments).
 

+ 1 - 1
scripts/lib/git.py

@@ -42,7 +42,7 @@ def find_changed_or_files(all, rev_or_files, patterns):
     return find_files(patterns)
 
   if not rev_or_files:
-    return find_changed('origin/master', patterns)
+    return find_changed('origin/main', patterns)
 
   if len(rev_or_files) == 1 and is_revision(rev_or_files[0]):
     return find_changed(rev_or_files[0], patterns)

+ 3 - 3
scripts/setup_check.sh

@@ -26,10 +26,10 @@ pip install --upgrade pip
 pip install flake8
 pip install six
 
-# Using actions/checkout@v3 creates a shallow clone that's missing the master
+# Using actions/checkout@v3 creates a shallow clone that's missing the main
 # branch. If it's not present, add it.
-if ! git rev-parse origin/master >& /dev/null; then
-  git remote set-branches --add origin master
+if ! git rev-parse origin/main >& /dev/null; then
+  git remote set-branches --add origin main
   git fetch origin
 fi
 

+ 1 - 1
scripts/style.sh

@@ -22,7 +22,7 @@
 # Pass a specific file or directory name to format just files found there
 #
 # Commonly
-# ./scripts/style.sh master
+# ./scripts/style.sh main
 
 # Set the environment variable FIR_CLANG_FORMAT_PATH to use a specific version
 # of clang-format, regardless of its order in the shell PATH.