Skip to content

Commit

Permalink
fix: use zip command directly without using find (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jithine authored Feb 4, 2019
1 parent 80457f8 commit ab32b31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions commands.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if [ `uname` = 'Darwin' ]; then export SD_ZIP_CMD_WRAPPER=""; else export SD_ZIP_CMD_WRAPPER="$(echo 'sd-step exec core/zip')"; fi
if [ `uname` = 'Darwin' ]; then export SD_ZIP_CMD_WRAPPER="eval"; else export SD_ZIP_CMD_WRAPPER="$(echo 'sd-step exec core/zip')"; fi
cd $SD_ARTIFACTS_DIR
find . -type f -print > manifest.txt
if [ "$SD_ZIP_ARTIFACTS" = "true" ]; then ZIPFILE=SD_ARTIFACT.zip && find . -type f -exec $SD_ZIP_CMD_WRAPPER zip $ZIPFILE {} + && store-cli set $ZIPFILE --type=artifact; else find . -type f -exec store-cli set $1 --type=artifact -- {} \;; fi;
if [ "$SD_ZIP_ARTIFACTS" = "true" ]; then ZIPFILE=SD_ARTIFACT.zip && $SD_ZIP_CMD_WRAPPER "zip -r -D $ZIPFILE ./" && store-cli set $ZIPFILE --type=artifact; else find . -type f -exec store-cli set $1 --type=artifact -- {} \;; fi;
2 changes: 1 addition & 1 deletion test/data/commands.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
if [ `uname` = 'Darwin' ]; then export SD_ZIP_CMD_WRAPPER=""; else export SD_ZIP_CMD_WRAPPER="$(echo 'sd-step exec core/zip')"; fi && cd $SD_ARTIFACTS_DIR && find . -type f -print > manifest.txt && if [ "$SD_ZIP_ARTIFACTS" = "true" ]; then ZIPFILE=SD_ARTIFACT.zip && find . -type f -exec $SD_ZIP_CMD_WRAPPER zip $ZIPFILE {} + && store-cli set $ZIPFILE --type=artifact; else find . -type f -exec store-cli set $1 --type=artifact -- {} \;; fi;
if [ `uname` = 'Darwin' ]; then export SD_ZIP_CMD_WRAPPER="eval"; else export SD_ZIP_CMD_WRAPPER="$(echo 'sd-step exec core/zip')"; fi && cd $SD_ARTIFACTS_DIR && find . -type f -print > manifest.txt && if [ "$SD_ZIP_ARTIFACTS" = "true" ]; then ZIPFILE=SD_ARTIFACT.zip && $SD_ZIP_CMD_WRAPPER "zip -r -D $ZIPFILE ./" && store-cli set $ZIPFILE --type=artifact; else find . -type f -exec store-cli set $1 --type=artifact -- {} \;; fi;

0 comments on commit ab32b31

Please sign in to comment.