Skip to content

Commit e6d77d9

Browse files
authored
Fix script to use Firebase/ subspecs. (#725)
1 parent faa7ef7 commit e6d77d9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/update_android_ios_dependencies.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def get_files(dirs_and_files, file_extension, file_name=None,
169169

170170
# List of Pods that we are interested in.
171171
PODS = (
172+
'Firebase',
172173
'FirebaseCore',
173174
'FirebaseAdMob',
174175
'FirebaseAnalytics',
@@ -340,8 +341,8 @@ def modify_pod_file(pod_file, pod_version_map, dryrun=True):
340341
match = re.match(RE_PODFILE_VERSION, line)
341342
if match:
342343
pod_name = match['pod_name']
343-
# Firebase/Auth -> FirebaseAuth
344-
pod_name_key = pod_name.replace('/', '')
344+
# Firebase/Auth -> Firestore (due to being a subspec)
345+
pod_name_key = re.sub(r'/.*$', '', pod_name)
345346
if pod_name_key in pod_version_map:
346347
latest_version = pod_version_map[pod_name_key]
347348
substituted_line = line.replace(match['version'], latest_version)
@@ -395,7 +396,7 @@ def modify_readme_file_pods(readme_filepath, version_map, dryrun=True):
395396
def replace_pod_line(m):
396397
if not m.group('pod_name'):
397398
return m.group(0)
398-
pod_key = m.group('pod_name').replace('/', '')
399+
pod_key = re.sub(r'/.*$', '', m.group('pod_name'))
399400
if pod_key not in version_map:
400401
return m.group(0)
401402
repl = '|%s| %s Cocoapod (%s)' % (m.group('spaces'),

0 commit comments

Comments
 (0)