Skip to content

Commit

Permalink
refactor: use RESET_TEXT vs NO_COLOR
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Jan 14, 2021
1 parent b0b24d1 commit fb0f7df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;

0 comments on commit fb0f7df

Please sign in to comment.