Skip to content

Commit

Permalink
Fix CI issue: move non-manifest resources to new macOS Resources syml…
Browse files Browse the repository at this point in the history
…inked dir
  • Loading branch information
ncooke3 committed Mar 20, 2024
1 parent 20d2b47 commit 3bae8c5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,13 @@ struct ZipBuilder {
// Ignore anything that not a framework.
guard fileManager.isDirectory(at: frameworkPath),
frameworkPath.lastPathComponent.hasSuffix("framework") else { continue }
let resourcesDir = frameworkPath.appendingPathComponent("Resources")
try fileManager.copyItem(at: xcResourceDir, to: resourcesDir)
let resourcesDir = frameworkPath.appendingPathComponent("Resources").resolvingSymlinksInPath()
let xcResourceDirContents = try! fileManager.contentsOfDirectory(at: xcResourceDir, includingPropertiesForKeys: nil)
let resourcesDirContents = try! fileManager.contentsOfDirectory(at: resourcesDir, includingPropertiesForKeys: nil)

for file in Set(xcResourceDirContents).subtracting(resourcesDirContents) {
try fileManager.copyItem(at: file, to: resourcesDir.appendingPathComponent(file.lastPathComponent))
}
}
}
try fileManager.removeItem(at: xcResourceDir)
Expand Down

0 comments on commit 3bae8c5

Please sign in to comment.