@@ -157,7 +157,7 @@ def get_files(dirs_and_files, file_extension, file_name=None,
157
157
return files
158
158
159
159
# Regex to match versions with just digits (ignoring things like -alpha, -beta)
160
- NON_EXPERIMENTAL_VERSION_RE = re .compile ('[0-9.]+$' )
160
+ RE_NON_EXPERIMENTAL_VERSION = re .compile ('[0-9.]+$' )
161
161
162
162
########## iOS pods versions update #######################################
163
163
@@ -221,7 +221,7 @@ def get_pod_versions(specs_repo, pods=PODS, ignore_pods=None,
221
221
parent_dir = os .path .dirname (podspec_file )
222
222
version = os .path .basename (parent_dir )
223
223
if not allow_experimental and '-cppsdk' not in version :
224
- if not re .match (NON_EXPERIMENTAL_VERSION_RE , version ):
224
+ if not re .match (RE_NON_EXPERIMENTAL_VERSION , version ):
225
225
continue
226
226
all_versions [podname ].append (version )
227
227
@@ -357,14 +357,16 @@ def modify_pod_file(pod_file, pod_version_map, dryrun=True):
357
357
print ()
358
358
359
359
360
+ # Regex to match lines like:
361
+ # | | Firebase/Auth Cocoapod (8.2.0)
360
362
RE_README_POD_VERSION = re .compile (
361
363
r"\|(?P<spaces>\s+)\| (?P<pod_name>.*) Cocoapod \((?P<version>([0-9.]+))\)" )
362
364
363
365
def modify_readme_file_pods (readme_filepath , version_map , dryrun = True ):
364
366
"""Modify a readme Markdown file to reference correct cocoapods versions.
365
367
366
368
Looks for lines like:
367
- <br>Firebase/AdMob Cocoapod (7.11.0)<br> Firebase/Auth Cocoapod (8.1 .0)
369
+ | | Firebase/Auth Cocoapod (8.2 .0)
368
370
for pods matching the ones in the version map, and modifies them in-place.
369
371
370
372
Args:
@@ -463,7 +465,7 @@ def get_latest_maven_versions(ignore_packages=None, allow_experimental=False):
463
465
versions = group_child .attrib ['versions' ].split (',' )
464
466
if not allow_experimental :
465
467
versions = [version for version in versions
466
- if re .match (NON_EXPERIMENTAL_VERSION_RE , version ) or '-cppsdk' in version ]
468
+ if re .match (RE_NON_EXPERIMENTAL_VERSION , version ) or '-cppsdk' in version ]
467
469
if versions :
468
470
latest_valid_version = versions [- 1 ]
469
471
latest_versions [package_full_name ] = latest_valid_version
@@ -533,6 +535,9 @@ def replace_dependency(m):
533
535
print ()
534
536
535
537
538
+ # Regex to match lines like:
539
+ # | | com.google.firebase:firebase-auth:1.2.3
540
+ # | | com.google.firebase:firebase-auth:1.2.3-alpha
536
541
RE_README_ANDROID_VERSION = re .compile (
537
542
r"\|(?P<spaces>\s+)\| (?P<pkg>[a-zA-Z0-9._-]+:[a-zA-Z0-9._-]+):([a-zA-Z0-9._-]+)" )
538
543
@@ -541,7 +546,7 @@ def modify_readme_file_android(readme_filepath, version_map, dryrun=True):
541
546
"""Modify a readme Markdown file to reference correct module versions.
542
547
543
548
Looks for lines like:
544
- <br> com.google.firebase:firebase-core:15.0.0<br>
549
+ | | com.google.firebase:firebase-auth:1.2.3
545
550
for modules matching the ones in the version map, and modifies them in-place.
546
551
547
552
Args:
@@ -595,6 +600,7 @@ def replace_module_line(m):
595
600
596
601
# Regex to match lines like:
597
602
# implementation 'com.google.firebase:firebase-auth:1.2.3'
603
+ # implementation 'com.google.firebase:firebase-auth:1.2.3-alpha'
598
604
RE_GRADLE_COMPILE_MODULE = re .compile (
599
605
r"implementation\s*\'(?P<pkg>[a-zA-Z0-9._-]+:[a-zA-Z0-9._-]+):([a-zA-Z0-9._-]+)\'" )
600
606
0 commit comments