@@ -35,7 +35,10 @@ enum InitializeRelease {
35
35
let versionParts = version. split ( separator: " . " )
36
36
let minorVersion = " \( versionParts [ 0 ] ) . \( versionParts [ 1 ] ) "
37
37
let branch = " version- \( minorVersion) "
38
- Shell . executeCommand ( " git checkout \( branch) 2>/dev/null || git checkout -b \( branch) " , workingDir: path)
38
+ Shell . executeCommand (
39
+ " git checkout \( branch) 2>/dev/null || git checkout -b \( branch) " ,
40
+ workingDir: path
41
+ )
39
42
return branch
40
43
}
41
44
@@ -47,19 +50,29 @@ enum InitializeRelease {
47
50
updateFirebasePodspec ( path: path, manifest: manifest)
48
51
} else {
49
52
updatePodspecVersion ( pod: pod, version: version, path: path)
50
-
53
+
51
54
// Pods depending on GoogleAppMeasurement and FirebaseFirestoreInternal specs
52
55
// should pin the dependency to the new version.
53
56
if pod. name. hasPrefix ( " GoogleAppMeasurement " ) || pod. name == " FirebaseFirestoreInternal " {
54
- updateDependenciesToLatest ( dependency: pod. name, pods: manifest. pods, version: version, path: path)
57
+ updateDependenciesToLatest (
58
+ dependency: pod. name,
59
+ pods: manifest. pods,
60
+ version: version,
61
+ path: path
62
+ )
55
63
} else if version. hasSuffix ( " .0.0 " ) {
56
64
let patchlessVersion = String ( version [ ..< version. lastIndex ( of: " . " ) !] )
57
- updateDependenciesToLatest ( dependency: pod. name, pods: manifest. pods, version: patchlessVersion, path: path)
65
+ updateDependenciesToLatest (
66
+ dependency: pod. name,
67
+ pods: manifest. pods,
68
+ version: patchlessVersion,
69
+ path: path
70
+ )
58
71
}
59
72
}
60
73
}
61
74
}
62
-
75
+
63
76
private static func updatePodspecVersion( pod: Pod ,
64
77
version: String ,
65
78
path: URL ) {
@@ -75,7 +88,7 @@ enum InitializeRelease {
75
88
pods: [ Pod ] ,
76
89
version: String ,
77
90
path: URL ) {
78
- let script : String =
91
+ let script =
79
92
#"-e "s|(\.dependency '"# + dependency + #"(/.*)?',[[:space:]]*'[^0-9]*).*|\1 \#( version) '|""#
80
93
let podspecs = pods. map { $0. podspecName ( ) } . joined ( separator: " " )
81
94
let command = " sed -i.bak -E \( script) \( podspecs) "
0 commit comments