Skip to content

Instantly share code, notes, and snippets.

@fdaciuk
Created December 16, 2012 00:24
Show Gist options
  • Save fdaciuk/4301346 to your computer and use it in GitHub Desktop.
Save fdaciuk/4301346 to your computer and use it in GitHub Desktop.
Teste para deploy de GIT
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