From dc59c464088e20980076099098bb34e366b0de14 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 11 Mar 2021 11:32:00 -0500 Subject: [PATCH] fix: properly zip project if directory used --- deploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 86ea99e..a0d5a67 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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;