@@ -82,6 +82,15 @@ def LogOrRun(command):
8282 else :
8383 os .system (command )
8484
85+ def LogAndRun (command ):
86+ """Log and run a command depending on test_mode value.
87+
88+ Args:
89+ command: command to log and run.
90+ """
91+ print 'Log only: {}' .format (command )
92+ os .system (command )
93+
8594
8695def GetVersionData (git_root , version ):
8796 """Update version specifier in FIROptions.m.
@@ -222,6 +231,9 @@ def GetCpdcInternal():
222231 return output_var
223232
224233
234+ # TODO update PushPodspecs to push dependent pods first, like when FirebaseCore
235+ # depends on the most recent version of GoogleUtilities.
236+
225237def PushPodspecs (version_data ):
226238 """Push podspecs to cpdc-firebase.
227239
@@ -240,11 +252,12 @@ def PushPodspecs(version_data):
240252 warnings_ok = ''
241253
242254 podspec = '{}.podspec' .format (pod )
243- LogOrRun ('pod repo push --skip-tests --use-json {} {}{}'
255+ LogAndRun ('pod repo push --skip-tests --use-json {} {}{}'
244256 .format (GetCpdcInternal (), podspec , warnings_ok ))
245- LogOrRun ('pod repo push --skip-tests --use-json --skip-import-validation ' +
257+ # This command will need to be rerun if any pods need to be pushed from Rapid.
258+ LogAndRun ('pod repo push --skip-tests --use-json --skip-import-validation ' +
246259 '--sources=sso://cpdc-internal/firebase.git,https://cdn.cocoapods.org' +
247- ' {} {}{} ' .format (GetCpdcInternal (), podspec , warnings_ok ))
260+ ' {} Firebase.podspec {} ' .format (GetCpdcInternal (), warnings_ok ))
248261
249262
250263def UpdateVersions ():
0 commit comments