@@ -48,20 +48,31 @@ enum InitializeRelease {
48
48
if pod. name == " Firebase " {
49
49
updateFirebasePodspec ( path: path, manifest: manifest)
50
50
} else {
51
- let scripts : String = [
52
- // Pods depending on GoogleAppMeasurement specs should pin the
53
- // dependency to the new version.
54
- #"-e "s|(\.dependency 'GoogleAppMeasurement/?.*',).*|\1 ' \#( version) '|""# ,
55
- // Replace the pod's `version` attribute with the new version.
56
- #"-e "s|(\.version.*=[[:space:]]*) '.*|\1 ' \#( version) '|""# ,
57
- ] . joined ( separator: " " )
58
-
59
- let command = " sed -i.bak -E \( scripts) \( pod. podspecName ( ) ) "
60
- Shell . executeCommand ( command, workingDir: path)
51
+ // Pods depending on GoogleAppMeasurement and FirebaseFirestoreInternal specs
52
+ // should pin the dependency to the new version.
53
+ for dep in [ " GoogleAppMeasurement " , " FirebaseFirestoreInternal " ] {
54
+ updateDependenciesToLatest ( dependency: dep, pod: pod, version: version, path: path)
55
+ }
61
56
}
62
57
}
63
58
}
64
59
60
+ /// Pods depending on GoogleAppMeasurement and FirebaseFirestoreInternal specs
61
+ /// should pin the dependency to the new version.
62
+ private static func updateDependenciesToLatest( dependency: String ,
63
+ pod: Pod ,
64
+ version: String ,
65
+ path: URL ) {
66
+ let scripts : String = [
67
+ #"-e "s|(\.dependency '"# + dependency + #"/?.*',).*|\1 ' \#( version) '|""# ,
68
+ // Replace the pod's `version` attribute with the new version.
69
+ #"-e "s|(\.version.*=[[:space:]]*) '.*|\1 ' \#( version) '|""# ,
70
+ ] . joined ( separator: " " )
71
+
72
+ let command = " sed -i.bak -E \( scripts) \( pod. podspecName ( ) ) "
73
+ Shell . executeCommand ( command, workingDir: path)
74
+ }
75
+
65
76
// This function patches the versions in the Firebase.podspec. It uses Swift instead of sed
66
77
// like the other version patching.
67
78
// TODO: Choose one or the other mechanism.
0 commit comments