Skip to content

Instantly share code, notes, and snippets.

@giehlman
Last active November 21, 2017 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giehlman/9bb57eb89b706bc7d43aab84fa1b5953 to your computer and use it in GitHub Desktop.
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)
#!/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