Skip to content

Commit 6238c93

Browse files
authored
[Release Tooling] Fix METADATA.md regression introduced in #12595 (#12661)
1 parent c8dadd0 commit 6238c93

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift

+13-3
Original file line numberDiff line numberDiff line change
@@ -690,11 +690,21 @@ struct ZipBuilder {
690690
result += "\n" // Necessary for Resource message to print properly in markdown.
691691

692692
// Check if there is a Resources directory, and if so, add the disclaimer to the dependency
693-
// string.
693+
// string. At this point, resources will be at the root of XCFrameworks.
694694
do {
695695
let fileManager = FileManager.default
696-
let resourceDirs = try fileManager.recursivelySearch(for: .directories(name: "Resources"),
697-
in: dir)
696+
let resourceDirs = try fileManager.contentsOfDirectory(
697+
at: dir,
698+
includingPropertiesForKeys: [.isDirectoryKey]
699+
).flatMap {
700+
try fileManager.contentsOfDirectory(
701+
at: $0,
702+
includingPropertiesForKeys: [.isDirectoryKey]
703+
)
704+
}.filter {
705+
$0.lastPathComponent == "Resources"
706+
}
707+
698708
if !resourceDirs.isEmpty {
699709
result += Constants.resourcesRequiredText
700710
result += "\n" // Separate from next pod in listing for text version.

0 commit comments

Comments
 (0)