File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,13 @@ if [ ! -f "$DIR_TO_ZIP/appspec.yml" ]; then
2020fi
2121
2222ZIP_FILENAME=$GITHUB_RUN_ID -$GITHUB_SHA .zip
23- EXCLUDED_FILES_COMMAND=$( sed -En " s/ /-x/p" )
2423
25- zip -r --quiet " $ZIP_FILENAME " " $DIR_TO_ZIP " -x " $EXCLUDED_FILES_COMMAND " -x \* .git\*
24+ # This creates a temp file to explode space delimited excluded files
25+ # into newline delimited exclusions passed to "-x" on the zip command.
26+ EXCLUSION_FILE=$( mktemp /tmp/zip-excluded.XXXXXX)
27+ echo " $INPUT_EXCLUDED_FILES " | tr ' ' ' \n' > " $EXCLUSION_FILE "
28+
29+ zip -r --quiet " $ZIP_FILENAME " " $DIR_TO_ZIP " -x " @$EXCLUSION_FILE "
2630if [ ! -f " $ZIP_FILENAME " ]; then
2731 echo " ::error::$ZIP_FILENAME was not generated properly (zip generation failed)."
2832 exit 1;
You can’t perform that action at this time.
0 commit comments