Skip to content

Commit a319e81

Browse files
committed
Style
1 parent 172e4fc commit a319e81

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

ReleaseTooling/Sources/FirebaseReleaser/InitializeRelease.swift

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ enum InitializeRelease {
3535
let versionParts = version.split(separator: ".")
3636
let minorVersion = "\(versionParts[0]).\(versionParts[1])"
3737
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+
)
3942
return branch
4043
}
4144

@@ -47,19 +50,29 @@ enum InitializeRelease {
4750
updateFirebasePodspec(path: path, manifest: manifest)
4851
} else {
4952
updatePodspecVersion(pod: pod, version: version, path: path)
50-
53+
5154
// Pods depending on GoogleAppMeasurement and FirebaseFirestoreInternal specs
5255
// should pin the dependency to the new version.
5356
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+
)
5563
} else if version.hasSuffix(".0.0") {
5664
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+
)
5871
}
5972
}
6073
}
6174
}
62-
75+
6376
private static func updatePodspecVersion(pod: Pod,
6477
version: String,
6578
path: URL) {
@@ -75,7 +88,7 @@ enum InitializeRelease {
7588
pods: [Pod],
7689
version: String,
7790
path: URL) {
78-
let script: String =
91+
let script =
7992
#"-e "s|(\.dependency '"# + dependency + #"(/.*)?',[[:space:]]*'[^0-9]*).*|\1\#(version)'|""#
8093
let podspecs = pods.map { $0.podspecName() }.joined(separator: " ")
8194
let command = "sed -i.bak -E \(script) \(podspecs)"

ReleaseTooling/Sources/FirebaseReleaser/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct FirebaseReleaser: ParsableCommand {
3737
@Option(default: false,
3838
help: "Initialize the release branch")
3939
var initBranch: Bool
40-
40+
4141
/// Set this option when starting a release.
4242
@Option(default: "main",
4343
help: "The base branch to use. Defaults to `main`.")

0 commit comments

Comments
 (0)