Skip to content

Commit

Permalink
fix: properly zip project if directory used
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Mar 11, 2021
1 parent dd52f6b commit dc59c46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ echo "$INPUT_EXCLUDED_FILES" | tr ' ' '\n' > "$EXCLUSION_FILE"

echo "::debug::Exclusion file created for files to ignore in Zip Generation."

zip -r --quiet "$ZIP_FILENAME" "$DIR_TO_ZIP" -x "@$EXCLUSION_FILE"
if [ -n "$DIR_TO_ZIP" ]; then
cd "$DIR_TO_ZIP";
fi

zip -r --quiet "$ZIP_FILENAME" . -x "@$EXCLUSION_FILE"
if [ ! -f "$ZIP_FILENAME" ]; then
echo "::error::$ZIP_FILENAME was not generated properly (zip generation failed)."
exit 1;
Expand Down

0 comments on commit dc59c46

Please sign in to comment.