diff --git a/deploy.sh b/deploy.sh index 6ea1fc6..810b473 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash -l set -e -NO_COLOR='\033[0m' +RESET_TEXT='\033[0m' RED='\033[0;31m' GREEN='\033[0;32m' ORANGE='\033[0;33m' @@ -76,7 +76,7 @@ function pollForSpecificDeployment() { STATUS=$(echo "$RESPONSE" | jq -r '.deploymentInfo.status') echo -e "${ORANGE}Deployment in progress. Sleeping 15 seconds. (Try $((++deadlockCounter)))"; - echo -e "Instance Overview: ${RED}Failed ($FAILED_COUNT), ${BLUE}In-Progress ($IN_PROGRESS_COUNT), ${NO_COLOR}Skipped ($SKIPPED_COUNT), ${BLUE}Pending ($PENDING_COUNT), ${GREEN}Succeeded ($SUCCESS_COUNT)" + echo -e "Instance Overview: ${RED}Failed ($FAILED_COUNT), ${BLUE}In-Progress ($IN_PROGRESS_COUNT), ${RESET_TEXT}Skipped ($SKIPPED_COUNT), ${BLUE}Pending ($PENDING_COUNT), ${GREEN}Succeeded ($SUCCESS_COUNT)" echo -e "Deployment Status: $STATUS" if [ "$FAILED_COUNT" -gt 0 ]; then @@ -132,16 +132,16 @@ function registerRevision() { } if $INPUT_CODEDEPLOY_REGISTER_ONLY; then - echo -e "${BLUE}Registering deployment to $NO_COLOR$INPUT_CODEDEPLOY_GROUP."; + echo -e "${BLUE}Registering deployment to ${RESET_TEXT}$INPUT_CODEDEPLOY_GROUP."; registerRevision - echo -e "${BLUE}Registered deployment to $NO_COLOR$INPUT_CODEDEPLOY_GROUP!"; + echo -e "${BLUE}Registered deployment to ${RESET_TEXT}$INPUT_CODEDEPLOY_GROUP!"; else - echo -e "${BLUE}Deploying to $NO_COLOR$INPUT_CODEDEPLOY_GROUP."; + echo -e "${BLUE}Deploying to ${RESET_TEXT}$INPUT_CODEDEPLOY_GROUP."; DEPLOYMENT_ID=$(deployRevision) sleep 10; pollForSpecificDeployment "$DEPLOYMENT_ID" - echo -e "${GREEN}Deployed to $NO_COLOR$INPUT_CODEDEPLOY_GROUP!"; + echo -e "${GREEN}Deployed to ${RESET_TEXT}$INPUT_CODEDEPLOY_GROUP!"; fi exit 0;