-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Avoid displaying sd-cmd not found error (#46)
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
if command -v sd-cmd >/dev/null 2>&1; then { sd-cmd exec sd/events@latest dns || echo "Something wrong while sending events" ; } else echo "no op"; fi && if [ `uname` = 'Darwin' ] || [ ${SD_HAB_ENABLED:-false} = 'false' ]; then export SD_ZIP_CMD_WRAPPER="eval" && export SD_CURL_CMD_WRAPPER="eval"; else export SD_ZIP_CMD_WRAPPER="$(echo 'sd-step exec core/zip')" && export SD_CURL_CMD_WRAPPER="$(echo 'sd-step exec core/curl')"; 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 && $SD_CURL_CMD_WRAPPER "curl -X POST -H \"Authorization: Bearer ${SD_TOKEN}\" \"${SD_BUILD_URL}/artifacts/unzip\""; else find . -type f -exec store-cli set $1 --type=artifact -- {} \;; fi; | ||
if command -v sd-cmd >/dev/null 2>&1; then { command_output=$(sd-cmd exec sd/events@latest dns 2>&1); sdcmd_status="$?"; [ "$sdcmd_status" -ne 0 ] && { echo "$command_output" | grep -q 'ERROR: Screwdriver API 404 Not Found: Command sd/events@latest does not exist' || { echo "$command_output" && echo "Something wrong while sending events"; } } || echo "$command_output"; } else echo "no op"; fi && if [ `uname` = 'Darwin' ] || [ ${SD_HAB_ENABLED:-false} = 'false' ]; then export SD_ZIP_CMD_WRAPPER="eval" && export SD_CURL_CMD_WRAPPER="eval"; else export SD_ZIP_CMD_WRAPPER="$(echo 'sd-step exec core/zip')" && export SD_CURL_CMD_WRAPPER="$(echo 'sd-step exec core/curl')"; 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 && $SD_CURL_CMD_WRAPPER "curl -X POST -H \"Authorization: Bearer ${SD_TOKEN}\" \"${SD_BUILD_URL}/artifacts/unzip\""; else find . -type f -exec store-cli set $1 --type=artifact -- {} \;; fi; |