Skip to content

Commit c657fc4

Browse files
committed
Fix PackageBuilder.swift create child directory
1 parent 07d7a7f commit c657fc4

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

Package.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ let package = Package(
3939
.library(name: "GitHubRestAPICode_Scanning", targets: ["GitHubRestAPICode_Scanning"]),
4040
.library(name: "GitHubRestAPISecurity_Advisories", targets: ["GitHubRestAPISecurity_Advisories"]),
4141
.library(name: "GitHubRestAPIIssues", targets: ["GitHubRestAPIIssues"]),
42-
.library(name: "GitHubRestAPIDocumentation.Docc", targets: ["GitHubRestAPIDocumentation.Docc"]),
43-
.library(name: "GitHubRestAPI_Resources", targets: ["GitHubRestAPI_Resources"]),
4442
.library(name: "GitHubRestAPIApps", targets: ["GitHubRestAPIApps"]),
4543
.library(name: "GitHubRestAPIGists", targets: ["GitHubRestAPIGists"]),
4644
.library(name: "GitHubRestAPIBilling", targets: ["GitHubRestAPIBilling"]),
@@ -287,22 +285,6 @@ let package = Package(
287285
],
288286
path: "Sources/issues"
289287
),
290-
.target(
291-
name: "GitHubRestAPIDocumentation.Docc",
292-
dependencies: [
293-
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
294-
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
295-
],
296-
path: "Sources/Documentation.docc"
297-
),
298-
.target(
299-
name: "GitHubRestAPI_Resources",
300-
dependencies: [
301-
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
302-
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
303-
],
304-
path: "Sources/_Resources"
305-
),
306288
.target(
307289
name: "GitHubRestAPIApps",
308290
dependencies: [

Scripts/PackageBuilder.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ struct SourcesBuilder {
6060
let sourceURLs = directoryEnumerator.compactMap { $0 as? URL }.filter { fileURL in
6161
guard let resourceValues = try? fileURL.resourceValues(forKeys: resourceKeys),
6262
let isDirectory = resourceValues.isDirectory,
63-
isDirectory
63+
isDirectory,
64+
fileURL.pathComponents.count == directoryURL.pathComponents.count + 1 // Check if it's a direct child
6465
else { return false }
6566
return true
6667
}

0 commit comments

Comments
 (0)