 
   // Add a testing tag to the head of the branch.
   private static func addTestingTag(path sdkRepoPath: URL, manifest: FirebaseManifest.Manifest) {
-    let manifest = FirebaseManifest.shared
     let testingTag = Constants.testingTagPrefix + manifest.version
     // Add or update the testing tag to the local sdk repo.
     Shell.executeCommand("git tag -af \(testingTag) -m 'spectesting'", workingDir: sdkRepoPath)

      }
    }
  }
}

  static let specRepo = "https://github.com/firebase/SpecsTesting"
  static let sdkRepo = "https://github.com/firebase/firebase-ios-sdk"
  static let testingTagPrefix = "testing-"
  static let cocoapodsDir =
    "\(ProcessInfo.processInfo.environment["HOME"]!)/.cocoapods/repos/\(localSpecRepoName)"
  static let versionFetchPatterns = [
    "json": "\"version\"[[:space:]]*:[[:space:]]*\"(.*)\"",
    "podspec": "\\.version[[:space:]]*=[[:space:]]*\'([^~=><].*)\'",
  ]
}

struct InitializeSpecTesting {
  enum VersionFetchError: Error {
    case noMatchesCaught
    case multipleMatches
    case noSubgroupCaught
  }

  static func setupRepo(sdkRepoURL: URL) {
    let manifest = FirebaseManifest.shared
    addSpecRepo(repoURL: Constants.specRepo)
    addTestingTag(path: sdkRepoURL, manifest: manifest)
    updatePodspecs(path: sdkRepoURL, manifest: manifest)
    copyPodspecs(from: sdkRepoURL, manifest: manifest)
  }

  // The SpecsTesting repo will be added to `${HOME}/.cocoapods/`, and all
