Skip to content

Commit dffe49c

Browse files
authored
Core and zip updates for 8.9.1 - Fix zip builder for patch distributions (#8892)
1 parent f33d7a1 commit dffe49c

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

Firebase.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Simplify your app development, grow your user base, and monetize more effectivel
4141
end
4242

4343
s.subspec 'CoreOnly' do |ss|
44-
ss.dependency 'FirebaseCore', '8.9.0'
44+
ss.dependency 'FirebaseCore', '8.9.1'
4545
ss.source_files = 'CoreOnly/Sources/Firebase.h'
4646
ss.preserve_paths = 'CoreOnly/Sources/module.modulemap'
4747
if ENV['FIREBASE_POD_REPO_FOR_DEV_POD'] then

FirebaseCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseCore'
3-
s.version = '8.9.0'
3+
s.version = '8.9.1'
44
s.summary = 'Firebase Core'
55

66
s.description = <<-DESC

ReleaseTooling/Sources/FirebaseManifest/FirebaseManifest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Foundation
2121
/// The version and releasing fields of the non-Firebase pods should be reviewed every release.
2222
/// The array should be ordered so that any pod's dependencies precede it in the list.
2323
public let shared = Manifest(
24-
version: "8.9.0",
24+
version: "8.9.1",
2525
pods: [
2626
Pod("FirebaseCoreDiagnostics", zip: true),
2727
Pod("FirebaseCore", zip: true),

ReleaseTooling/Sources/ZipBuilder/CocoaPodUtils.swift

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import Foundation
1818
import Utils
19+
import FirebaseManifest
1920

2021
/// CocoaPod related utility functions. The enum type is used as a namespace here instead of having
2122
/// root functions, and no cases should be added to it.
@@ -474,6 +475,9 @@ enum CocoaPodUtils {
474475
"""
475476

476477
var versionsSpecified = false
478+
let firebaseVersion = FirebaseManifest.shared.version
479+
let versionChunks = firebaseVersion.split(separator: ".")
480+
let minorVersion = "\(versionChunks[0]).\(versionChunks[1]).0"
477481

478482
// Loop through the subspecs passed in and use the actual Pod name.
479483
for pod in pods {
@@ -483,7 +487,21 @@ enum CocoaPodUtils {
483487
FileManager.default.fileExists(atPath: localURL.appendingPathComponent(podspec).path) {
484488
podfile += " pod '\(pod.name)', :path => '\(localURL.path)'"
485489
} else if let podVersion = pod.version {
486-
podfile += " pod '\(pod.name)', '\(podVersion)'"
490+
// To support Firebase patch versions in the Firebase zip distribution, allow patch updates
491+
// for all pods except Firebase and FirebaseCore. The Firebase Swift pods are not yet in the
492+
// zip distribution.
493+
var podfileVersion = podVersion
494+
if pod.name.starts(with: "Firebase"),
495+
!pod.name.hasSuffix("Swift"),
496+
pod.name != "Firebase",
497+
pod.name != "FirebaseCore" {
498+
podfileVersion = podfileVersion.replacingOccurrences(
499+
of: firebaseVersion,
500+
with: minorVersion
501+
)
502+
podfileVersion = "~> \(podfileVersion)"
503+
}
504+
podfile += " pod '\(pod.name)', '\(podfileVersion)'"
487505
} else if pod.name.starts(with: "Firebase"),
488506
let localURL = localPodspecPath,
489507
FileManager.default

0 commit comments

Comments
 (0)