Skip to content

Commit 92dcff1

Browse files
authored
Changes to build m45 zip (#2561)
1 parent 2ac4f6d commit 92dcff1

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

ZipBuilder/Sources/ZipBuilder/CocoaPodUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public enum CocoaPodUtils {
146146
}
147147

148148
// Run pod install on the directory that contains the Podfile and blank Xcode project.
149-
let result = Shell.executeCommandFromScript("pod install", workingDir: directory)
149+
let result = Shell.executeCommandFromScript("pod _1.5.3_ install", workingDir: directory)
150150
switch result {
151151
case let .error(code, output):
152152
fatalError("""

ZipBuilder/Sources/ZipBuilder/FrameworkBuilder.swift

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,24 +83,26 @@ struct FrameworkBuilder {
8383
cacheEnabled: Bool = false) -> (framework: URL, resources: URL) {
8484
print("Building \(podName)")
8585

86+
// Cache is temporarily disabled due to pod cache list issues.
8687
// Get the CocoaPods cache to see if we can pull from any frameworks already built.
87-
let podsCache = CocoaPodUtils.listPodCache(inDir: projectDir)
88-
89-
guard let cachedVersions = podsCache[podName] else {
90-
fatalError("Cannot find a pod cache for framework \(podName).")
91-
}
92-
93-
guard let podInfo = cachedVersions[version] else {
94-
fatalError("""
95-
Cannot find a pod cache for framework \(podName) at version \(version).
96-
Something could be wrong with your CocoaPods cache - try running the following:
97-
98-
pod cache clean '\(podName)' --all
99-
""")
100-
}
101-
102-
// TODO: Figure out if we need the MD5 at all.
103-
let md5 = Shell.calculateMD5(for: podInfo.installedLocation)
88+
// let podsCache = CocoaPodUtils.listPodCache(inDir: projectDir)
89+
//
90+
// guard let cachedVersions = podsCache[podName] else {
91+
// fatalError("Cannot find a pod cache for framework \(podName).")
92+
// }
93+
//
94+
// guard let podInfo = cachedVersions[version] else {
95+
// fatalError("""
96+
// Cannot find a pod cache for framework \(podName) at version \(version).
97+
// Something could be wrong with your CocoaPods cache - try running the following:
98+
//
99+
// pod cache clean '\(podName)' --all
100+
// """)
101+
// }
102+
//
103+
// // TODO: Figure out if we need the MD5 at all.
104+
let md5 = podName
105+
// let md5 = Shell.calculateMD5(for: podInfo.installedLocation)
104106

105107
// Get (or create) the cache directory for storing built frameworks.
106108
let fileManager = FileManager.default

ZipBuilder/Sources/ZipBuilder/Subspec.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public enum Subspec: String, CaseIterable {
3636
case mlModelInterpreter = "MLModelInterpreter"
3737
case mlNaturalLanguage = "MLNaturalLanguage"
3838
case mlNLLanguageID = "MLNLLanguageID"
39+
case mlNLSmartReply = "MLNLSmartReply"
3940
case mlVision = "MLVision"
4041
case mlVisionBarcodeModel = "MLVisionBarcodeModel"
4142
case mlVisionFaceModel = "MLVisionFaceModel"

0 commit comments

Comments
 (0)