@@ -20,25 +20,19 @@ import FirebaseManifest
2020import Utils
2121
2222private enum Destination {
23- case cpdc , trunk
23+ case staging , trunk
2424}
2525
2626enum Push {
27- static func pushPodsToCPDC ( gitRoot: URL ) {
28- push ( to: . cpdc , gitRoot: gitRoot)
27+ static func pushPodsToStaging ( gitRoot: URL ) {
28+ push ( to: . staging , gitRoot: gitRoot)
2929 }
3030
3131 static func publishPodsToTrunk( gitRoot: URL ) {
3232 push ( to: . trunk, gitRoot: gitRoot)
3333 }
3434
3535 private static func push( to destination: Destination , gitRoot: URL ) {
36- let cpdcRepo = " sso://cpdc-internal/firebase "
37- let cpdcLocation = findOrRegisterPrivateCocoaPodsRepo (
38- repo: cpdcRepo,
39- gitRoot: gitRoot,
40- defaultRepoName: " cpdc-internal-firebase "
41- )
4236 let stagingRepo = " [email protected] :firebase/SpecsStaging" 4337 let stagingLocation = findOrRegisterPrivateCocoaPodsRepo (
4438 repo: stagingRepo,
@@ -52,23 +46,14 @@ enum Push {
5246
5347 let command : String = {
5448 switch destination {
55- case . cpdc:
56- var pushCommands = " "
57- if pod. isClosedSource {
58- // Push closed source pods to SpecsStaging to keep CI working.
59- pushCommands =
60- " pod repo push --skip-tests --use-json \( warningsOK) \( stagingLocation) " +
61- pod. skipImportValidation ( ) + " \( pod. podspecName ( ) ) " +
62- " --sources= \( stagingRepo) .git,https://cdn.cocoapods.org && "
63- }
64- pushCommands += " pod repo push --skip-tests --use-json \( warningsOK) \( cpdcLocation) " +
49+ case . staging:
50+ return " pod repo push --skip-tests --use-json \( warningsOK) \( stagingLocation) " +
6551 pod. skipImportValidation ( ) + " \( pod. podspecName ( ) ) " +
66- " --sources= \( cpdcRepo) .git,https://cdn.cocoapods.org "
67- return pushCommands
68-
52+ " --sources= \( stagingRepo) .git,https://cdn.cocoapods.org "
6953 case . trunk:
7054 return " pod trunk push --skip-tests --synchronous \( warningsOK) " +
71- pod. skipImportValidation ( ) + " ~/.cocoapods/repos/ \( cpdcLocation) /Specs/ \( pod. name) / " +
55+ pod
56+ . skipImportValidation ( ) + " ~/.cocoapods/repos/ \( stagingLocation) /Specs/ \( pod. name) / " +
7257 " \( manifest. versionString ( pod) ) / \( pod. name) .podspec.json "
7358 }
7459 } ( )
0 commit comments