Skip to content

Commit 80e25a4

Browse files
authored
Speed up zip builder development iteration (#4449)
1 parent 5fcb291 commit 80e25a4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ZipBuilder/Sources/ZipBuilder/LaunchArgs.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ struct LaunchArgs {
8585
return "The path to the directory containing the blank xcodeproj and Info.plist for " +
8686
"building source based frameworks"
8787
case .updatePodRepo:
88-
return "A flag to run `pod repo update` before building the zip file."
88+
return "A flag to run `pod repo update` and `pod cache clean -all` before building the " +
89+
"zip file."
8990
case .zipPods:
9091
return "The path to a JSON file of the pods (with optional version) to package into a zip."
9192
}
@@ -149,7 +150,7 @@ struct LaunchArgs {
149150
init(userDefaults defaults: UserDefaults = UserDefaults.standard,
150151
fileChecker: FileChecker = FileManager.default) {
151152
// Override default values for specific keys.
152-
// - Always run `pod repo update` unless explicitly set to false.
153+
// - Always run `pod repo update` and pod cache clean -all` unless explicitly set to false.
153154
defaults.register(defaults: [Key.updatePodRepo.rawValue: true])
154155

155156
// Get the project template directory, and fail if it doesn't exist.

ZipBuilder/Sources/ZipBuilder/ZipBuilder.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ struct ZipBuilder {
128128
([CocoaPodUtils.PodInfo], [String: [URL]]) {
129129
// Remove CocoaPods cache so the build gets updates after a version is rebuilt during the
130130
// release process.
131-
CocoaPodUtils.cleanPodCache()
131+
if LaunchArgs.shared.updatePodRepo {
132+
CocoaPodUtils.cleanPodCache()
133+
}
132134

133135
// We need to install all the pods in order to get every single framework that we'll need
134136
// for the zip file. We can't install each one individually since some pods depend on different

0 commit comments

Comments
 (0)