Skip to content

Commit 46e3293

Browse files
authored
Disable CocoaPods minimum version install testing for Firebase zip build (#7966)
1 parent 5d15437 commit 46e3293

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

ReleaseTooling/Sources/ZipBuilder/Platform.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ class PlatformMinimum {
5858
minimumMacOSVersion = macos
5959
minimumTVOSVersion = tvos
6060
}
61+
62+
/// Useful to disable minimum version checking on pod installation. Pods still get built with
63+
/// for the minimum version specified in the podspec.
64+
static func useRecentVersions() {
65+
minimumIOSVersion = "14.0"
66+
minimumMacOSVersion = "11.0"
67+
minimumTVOSVersion = "14.0"
68+
}
6169
}
6270

6371
class SkipCatalyst {

ReleaseTooling/Sources/ZipBuilder/main.swift

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@ struct ZipBuilderTool: ParsableCommand {
230230
fatalError("Missing template inside of the repo. \(templateDir) does not exist.")
231231
}
232232

233-
// Set the platform minimum versions.
234-
PlatformMinimum.initialize(ios: minimumIOSVersion,
235-
macos: minimumMacOSVersion,
236-
tvos: minimumTVOSVersion)
237-
238233
// Update iOS target platforms if `--include-catalyst` was specified.
239234
if !includeCatalyst {
240235
SkipCatalyst.set()
@@ -272,6 +267,11 @@ struct ZipBuilderTool: ParsableCommand {
272267
}
273268

274269
if let podsToBuild = podsToBuild {
270+
// Set the platform minimum versions.
271+
PlatformMinimum.initialize(ios: minimumIOSVersion,
272+
macos: minimumMacOSVersion,
273+
tvos: minimumTVOSVersion)
274+
275275
let (installedPods, frameworks, _) =
276276
builder.buildAndAssembleZip(podsToInstall: podsToBuild,
277277
includeDependencies: buildDependencies)
@@ -300,6 +300,12 @@ struct ZipBuilderTool: ParsableCommand {
300300
}
301301
} else {
302302
// Do a Firebase Zip Release package build.
303+
304+
// For the Firebase zip distribution, we disable version checking at install time by
305+
// setting a high version to install. The minimum versions are controlled by each individual
306+
// pod's podspec options.
307+
PlatformMinimum.useRecentVersions()
308+
303309
var carthageOptions: CarthageBuildOptions?
304310
if carthageBuild {
305311
let jsonDir = paths.repoDir.appendingPathComponents(["ReleaseTooling", "CarthageJSON"])

0 commit comments

Comments
 (0)