Created
December 16, 2012 00:24
-
-
Save fdaciuk/4301346 to your computer and use it in GitHub Desktop.
Teste para deploy de GIT
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
git checkout master | |
git branch | |
echo '### PRODUÇÃO REPORT ###' | |
git status | |
echo '++++++++++++++++++++++' | |
echo 'Deseja fazer o deploy [s/n]?' | |
read deploy | |
echo '++++++++++++++++++++++' | |
if [ $deploy == 's' ]; then | |
cd ~/public_html/homologacao/es | |
git checkout dev | |
git add . | |
git commit -a -m 'Deploy' | |
git push origin dev | |
git checkout master | |
git merge dev | |
git push origin master | |
git status | |
echo 'OK! Dados enviado ao repositório.' | |
echo 'Deseja atualizar o ambiente de produção [s/n]?' | |
read update_prod | |
if [ $update_prod == 's' ]; then | |
cd ~/public_html/es | |
git branch | |
git checkout master | |
git status | |
git pull origin master | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment