Skip to content

Commit

Permalink
[Release Tooling] Fix METADATA.md regression introduced in #12595 (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Apr 2, 2024
1 parent c8dadd0 commit 6238c93
Showing 1 changed file with 13 additions and 3 deletions.
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

0 comments on commit 6238c93

Please sign in to comment.