From 8bb25cd09a5bc96d14658fcb5a560de4ef6b8ca2 Mon Sep 17 00:00:00 2001 From: Andrew Miner Date: Tue, 5 Apr 2016 18:30:21 -0700 Subject: [PATCH] Correct errors in upload / deploy scripts --- Gruntfile.coffee | 2 +- scripts/deploy | 2 +- scripts/s3_upload | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 726213360..43f7e1d66 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -263,7 +263,7 @@ module.exports = (grunt)-> grunt.registerTask 'script:deploy:prod', "deploy code by copying to the production branch", -> done = this.async() - grunt.util.spawn cmd:'./scripts/deploy', args:['--production'], opts:{stdio:'inherit'}, (error)-> done(error) + grunt.util.spawn cmd:'./scripts/deploy', args:['--prod'], opts:{stdio:'inherit'}, (error)-> done(error) grunt.registerTask 'script:deploy:staging', "deploy code by copying to the staging branch", -> done = this.async() diff --git a/scripts/deploy b/scripts/deploy index 119806aa7..208ff1598 100755 --- a/scripts/deploy +++ b/scripts/deploy @@ -9,7 +9,7 @@ ENVIRONMENT="" while [[ "$1" != "" ]]; do case "$1" in "--staging") ENVIRONMENT="staging";; - "--prod") ENVIRONMENT="prod";; + "--prod") ENVIRONMENT="production";; *) die "Please specify environment: --staging or --prod";; esac shift diff --git a/scripts/s3_upload b/scripts/s3_upload index a556d82f3..97f410ffd 100755 --- a/scripts/s3_upload +++ b/scripts/s3_upload @@ -1,5 +1,10 @@ #!/bin/bash +function die { + echo $* + exit 1 +} + if [[ -e "./aws.config" ]]; then export AWS_CONFIG_FILE="./aws.config" else