@@ -82,6 +82,15 @@ def LogOrRun(command):
82
82
else :
83
83
os .system (command )
84
84
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
+
85
94
86
95
def GetVersionData (git_root , version ):
87
96
"""Update version specifier in FIROptions.m.
@@ -222,6 +231,9 @@ def GetCpdcInternal():
222
231
return output_var
223
232
224
233
234
+ # TODO update PushPodspecs to push dependent pods first, like when FirebaseCore
235
+ # depends on the most recent version of GoogleUtilities.
236
+
225
237
def PushPodspecs (version_data ):
226
238
"""Push podspecs to cpdc-firebase.
227
239
@@ -240,11 +252,12 @@ def PushPodspecs(version_data):
240
252
warnings_ok = ''
241
253
242
254
podspec = '{}.podspec' .format (pod )
243
- LogOrRun ('pod repo push --skip-tests --use-json {} {}{}'
255
+ LogAndRun ('pod repo push --skip-tests --use-json {} {}{}'
244
256
.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 ' +
246
259
'--sources=sso://cpdc-internal/firebase.git,https://cdn.cocoapods.org' +
247
- ' {} {}{} ' .format (GetCpdcInternal (), podspec , warnings_ok ))
260
+ ' {} Firebase.podspec {} ' .format (GetCpdcInternal (), warnings_ok ))
248
261
249
262
250
263
def UpdateVersions ():
0 commit comments