Skip to content

Commit edb9408

Browse files
authored
Don't generate Carthage for xcframeworks (#7131)
1 parent e71f385 commit edb9408

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ReleaseTooling/Sources/ZipBuilder/CarthageUtils.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,19 @@ extension CarthageUtils {
106106
let fullPath = packagedDir.appendingPathComponent(product)
107107
guard FileManager.default.isDirectory(at: fullPath) else { continue }
108108

109+
// Abort Carthage generation if there are any xcframeworks.
110+
do {
111+
let files = try FileManager.default.contentsOfDirectory(at: fullPath,
112+
includingPropertiesForKeys: nil)
113+
let xcfFiles = files.filter { $0.pathExtension == "xcframework" }
114+
if xcfFiles.count > 0 {
115+
print("Skipping Carthage generation for \(product) since it includes xcframeworks.")
116+
continue
117+
}
118+
} catch {
119+
fatalError("Failed to get contents of \(fullPath).")
120+
}
121+
109122
// Parse the JSON file, ensure that we're not trying to overwrite a release.
110123
var jsonManifest = parseJSONFile(fromDir: jsonDir, product: product)
111124

0 commit comments

Comments
 (0)