Skip to content

[Release Tooling] Fix METADATA.md regression introduced in #12595 #12661

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 8 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions ReleaseTooling/Sources/ZipBuilder/ZipBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,21 @@ struct ZipBuilder {
result += "\n" // Necessary for Resource message to print properly in markdown.

// Check if there is a Resources directory, and if so, add the disclaimer to the dependency
// string.
// string. At this point, resources will be at the root of XCFrameworks.
do {
let fileManager = FileManager.default
let resourceDirs = try fileManager.recursivelySearch(for: .directories(name: "Resources"),
in: dir)
let resourceDirs = try fileManager.contentsOfDirectory(
at: dir,
includingPropertiesForKeys: [.isDirectoryKey]
).flatMap {
try fileManager.contentsOfDirectory(
at: $0,
includingPropertiesForKeys: [.isDirectoryKey]
)
}.filter {
$0.lastPathComponent == "Resources"
}

if !resourceDirs.isEmpty {
result += Constants.resourcesRequiredText
result += "\n" // Separate from next pod in listing for text version.
Expand Down
Loading