Last active
October 25, 2015 19:16
-
-
Save mtmckenna/2bbce8c14f520c78088b to your computer and use it in GitHub Desktop.
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
export AWS_SECRET_KEY=`cat .aws_secret_key` | |
ENVIRONMENT=production | |
ember deploy --environment=$ENVIRONMENT | |
if [ $? -eq 0 ] | |
then | |
LATEST_REVISION="$(ember deploy:list --environment=$ENVIRONMENT | grep "1)" | awk '{print $2}')" | |
ember deploy:activate --revision=$LATEST_REVISION --environment=$ENVIRONMENT | |
echo "$(tput setaf 2)Deployed the heck out of the latest revision." | |
exit 0 | |
else | |
echo "$(tput setaf 1)Something is jacked up with the deploy." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a shell script to deploy and activate an ember-deploy-s3 compatible Ember app.
To use this script, paste your AWS secret key in a
.aws_secret_key
file and make sure you ignore.aws_secret_key
in your.gitignore
file so you don't commit it to your repo.Your
config/deploy.js
will look something like this:When you're all set up, you should be able to deploy your app by typing the following in the command line:
sh deploy-latest-revision-to-s3.sh
.