Last active
November 21, 2017 14:42
-
-
Save giehlman/9bb57eb89b706bc7d43aab84fa1b5953 to your computer and use it in GitHub Desktop.
Simple shell script to deploy a NodeJS application to elastic beanstalk (using .elasticbeanstalk/config.yml)
This file contains hidden or 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
#!/usr/bin/env bash | |
msg=$(echo $(git log -1 --pretty=%B)) | |
lbl=$(echo $(git log -1 --format='%H')) | |
echo "--- Deploying to EB ---" | |
echo "Message: " $msg | |
echo "Label: " $lbl | |
read -p "-----> DO YOU WANT TO DEPLOY? [Yy]es " -n 1 -r | |
if ! [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
echo "!!! ABORTED !!!" | |
exit 1 | |
fi | |
eb deploy -m "$msg" -l "$lbl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment