It would be cool if I could copy the files in a resources directory to the target bundle
JetForMe opened this issue · 0 comments
JetForMe commented
Description
In my Swift package I have tests that rely on data files in Tests/TestTargetName/Resources
. If I set that up as .copy("Resources")
, the directory gets copied to the bundle, and I end up with the files under Debug/SwiftTIFFTests.xctest/Contents/Resources/SwiftTIFF_SwiftTIFFTests.bundle/Contents/Resources/Resources/
, which is functional, but inelegant.
It would be nice if .copy()
were extended to allow me to specify the contents, rather than the directory. For example:
public static func copy(_ path: String, contentsOnly: Bool = false) -> PackageDescription.Resource
Existing usages would not change, but invoking .copy("Resources", contentsOnly: true)
would mean to copy the contents of the Resources
directory, but not the directory itself.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version && uname -a
)
No response