Skip to content

Commit

Permalink
[Release Tooling] Move resource bundles, if any, outside of xcframewo…
Browse files Browse the repository at this point in the history
…rk (approach 2)
  • Loading branch information
ncooke3 committed Nov 18, 2023
1 parent b891c92 commit f881399
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,16 @@ struct ZipBuilder {
try fileManager.copyItem(at: xcframework, to: destination)
copiedFrameworkNames
.append(xcframeworkName.replacingOccurrences(of: ".xcframework", with: ""))

// Move any resource bundles from within each xcframework to outside of it.
let resourcesDir = destination.appendingPathComponent("Resources")
if fileManager.directoryExists(at: resourcesDir) {
try fileManager.contentsOfDirectory(at: resourcesDir, includingPropertiesForKeys: nil)
.forEach {
try fileManager.copyItem(at: $0, to: dir.appendingPathComponent($0.lastPathComponent))
}
try fileManager.removeItem(at: resourcesDir)
}
}
}

Expand Down

0 comments on commit f881399

Please sign in to comment.