File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,17 @@ copyProductResources() {
421
421
done
422
422
}
423
423
424
+ # This copies SwiftPM resource directories into the LAMBDA_BUILD_DIR (defaults
425
+ # to `.build/lambda`).
426
+ # SPM puts the resource directories into SPM_BUILD_PRODUCT_RESOURCES_DIR,
427
+ # for example `PhoneNumberKit_PhoneNumberKit.resources`.
428
+ copySwiftPMResources () {
429
+ for dir in $( ls 2> /dev/null -d " ${SPM_BUILD_PRODUCT_RESOURCES_DIR} /" * .resources) ; do
430
+ echo " Embedding package resource dir: $( basename $dir ) "
431
+ cp -ac " ${dir} " " ${LAMBDA_BUILD_DIR} /"
432
+ done
433
+ }
434
+
424
435
# This zips the LAMBDA_BUILD_DIR (.build/lambda) into a zipfile for
425
436
# distribution.
426
437
zipBuildDir () {
@@ -447,6 +458,7 @@ prepareLambdaDir
447
458
copySharedLibraryDependencies
448
459
copyBuildProduct
449
460
copyProductResources
461
+ copySwiftPMResources
450
462
451
463
if [[ " x${verbose} " = " xyes" ]]; then
452
464
echo -n " Zipping .."
Original file line number Diff line number Diff line change 237
237
fi
238
238
239
239
SPM_EXECUTABLE_BUILD_PRODUCT=" ${SPM_BUILD_DIR} /${TARGET} /${SPM_BUILD_CONFIG} /${PRODUCT_NAME} "
240
+ SPM_BUILD_PRODUCT_RESOURCES_DIR=" ${SPM_BUILD_DIR} /${TARGET} /${SPM_BUILD_CONFIG} "
240
241
241
242
LAMBDA_BUILD_DIR=${LAMBDA_BUILD_DIR:= ${BUILD_DIR} / lambda}
242
243
LAMBDA_EXECUTABLE_NAME=bootstrap
You can’t perform that action at this time.
0 commit comments