diff --git a/.github/workflows/scripts/check-archive-plugin.sh b/.github/workflows/scripts/check-archive-plugin.sh index 3c127be8..218ee79a 100755 --- a/.github/workflows/scripts/check-archive-plugin.sh +++ b/.github/workflows/scripts/check-archive-plugin.sh @@ -40,7 +40,14 @@ unzip -l "${ZIP_FILE}" | grep --silent bootstrap # if EXAMPLE is ResourcesPackaging, check if the ZIP file contains hello.txt if [ "$EXAMPLE" == "ResourcesPackaging" ]; then + echo "Checking if resource was added to the ZIP file" unzip -l "${ZIP_FILE}" | grep --silent hello.txt + SUCCESS=$? + if [ "$SUCCESS" -eq 1 ]; then + log "❌ Resource not found." && exit 1 + else + log "✅ Resource found." + fi fi echo "✅ The archive plugin is OK with example ${EXAMPLE}" diff --git a/Plugins/AWSLambdaPackager/Plugin.swift b/Plugins/AWSLambdaPackager/Plugin.swift index 01e47b3d..10d9c8a3 100644 --- a/Plugins/AWSLambdaPackager/Plugin.swift +++ b/Plugins/AWSLambdaPackager/Plugin.swift @@ -250,11 +250,11 @@ struct AWSLambdaPackager: CommandPlugin { let relocatedResourcesDirectory = workingDirectory.appending(path: resourcesDirectoryName) if FileManager.default.fileExists(atPath: artifactURL.path()) { do { + arguments.append(resourcesDirectoryName) try FileManager.default.copyItem( atPath: artifactURL.path(), toPath: relocatedResourcesDirectory.path() ) - arguments.append(resourcesDirectoryName) } catch let error as CocoaError { // On Linux, when the build has been done with Docker,