Skip to content

Commit

Permalink
Add another check before uploading. Also color messages red.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gilmer committed Apr 6, 2019
1 parent 415d299 commit 922e601
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/upload-secure-migration
Expand Up @@ -17,7 +17,7 @@ readonly usage="usage: $0 <production_migration_file>"

function proceed() {
proceed_message=${1:-"proceed"}
echo -n "${proceed_message} (y/N) "
echo -en "\e[31m${proceed_message} (y/N) \e[39m"
read -r proceed
if [[ "$proceed" =~ ^[^yY]*$ ]]; then
echo "exiting"
Expand Down Expand Up @@ -69,6 +69,8 @@ echo
# Upload secure migration
#

proceed "Are you ready to upload the migrations? This will overwrite files of the same name in S3."

for environment in "${environments[@]}"; do
echo "Uploading to: $environment"
sleep 1
Expand Down

0 comments on commit 922e601

Please sign in to comment.