Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/scripts/check-archive-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know these two lines can be merged as one but I favored readability over concision

log "❌ Resource not found." && exit 1
else
log "✅ Resource found."
fi
fi

echo "✅ The archive plugin is OK with example ${EXAMPLE}"
Expand Down
2 changes: 1 addition & 1 deletion Plugins/AWSLambdaPackager/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down