Moved the files under the "Resources/Files" folder in the library target to the "Resources/Files/Sources" folder.
This commit is contained in:
parent
3f8651ca52
commit
0b69973537
@ -1,10 +1,10 @@
|
|||||||
enum File: String {
|
enum File: String {
|
||||||
case dockerFile = "docker_file"
|
case dockerFile = "DockerFile"
|
||||||
case dockerIgnore = "docker_ignore"
|
case dockerIgnore = "DockerIgnore"
|
||||||
case gitIgnore = "git_ignore"
|
case gitIgnore = "GitIgnore"
|
||||||
case license
|
case license = "License"
|
||||||
case package
|
case package = "Package"
|
||||||
case readme
|
case readme = "Readme"
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
@ -38,7 +38,7 @@ extension File {
|
|||||||
|
|
||||||
var resourcePath: String {
|
var resourcePath: String {
|
||||||
switch self {
|
switch self {
|
||||||
default: "Resources/Files"
|
default: "Resources/Files/Sources"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,17 +20,17 @@ public struct CopyFilesTask {
|
|||||||
// MARK: Functions
|
// MARK: Functions
|
||||||
|
|
||||||
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
|
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
|
||||||
for resource in File.allCases {
|
for file in File.allCases {
|
||||||
guard let source = bundleService.url(
|
guard let source = bundleService.url(
|
||||||
forResource: resource.rawValue,
|
forResource: file.rawValue,
|
||||||
withExtension: nil,
|
withExtension: nil,
|
||||||
subdirectory: resource.resourcePath
|
subdirectory: file.resourcePath
|
||||||
) else {
|
) else {
|
||||||
assertionFailure("URL should have been initialized.")
|
assertionFailure("URL should have been initialized.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let destination = rootFolder.appendingPath(resource.filePath)
|
let destination = rootFolder.appendingPath(file.filePath)
|
||||||
|
|
||||||
try await fileService.copyFile(from: source, to: destination)
|
try await fileService.copyFile(from: source, to: destination)
|
||||||
}
|
}
|
||||||
|
@ -81,12 +81,12 @@ private extension FileTests {
|
|||||||
|
|
||||||
|
|
||||||
static let resourcePaths: [String] = [
|
static let resourcePaths: [String] = [
|
||||||
"Resources/Files",
|
"Resources/Files/Sources",
|
||||||
"Resources/Files",
|
"Resources/Files/Sources",
|
||||||
"Resources/Files",
|
"Resources/Files/Sources",
|
||||||
"Resources/Files",
|
"Resources/Files/Sources",
|
||||||
"Resources/Files",
|
"Resources/Files/Sources",
|
||||||
"Resources/Files"
|
"Resources/Files/Sources"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user