Last active
July 31, 2021 20:59
-
-
Save giovanigenerali/87bb9dc6010de05390b3e46a7442ef18 to your computer and use it in GitHub Desktop.
AWS EB Deploy Script
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
#!/bin/bash | |
DATE=$(date '+[%Y-%m-%d %H:%M:%S]') | |
LABEL=$(git log --pretty=format:"%h" -1) | |
MESSAGE=$(git log --pretty=format:"%s" -1) | |
MACHINE=$1 | |
echo "$DATE - $LABEL" | |
echo $MESSAGE | |
echo $MACHINE | |
eb deploy $MACHINE -l "$DATE - $LABEL" -m "$MESSAGE" | |
################################################################### | |
# - criar o arquivo deploy.sh na pasta raiz do usuário | |
# - arquivo precisa de premissão, executar: chmod 777 deploy.sh | |
# - criar alias (alias deploy="sh ~/deploy.sh") no ~/.bash_profile | |
################################################################## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment