-
-
Save waltercruz/ef5c2ebe4c449f376ca178670c95ac8e to your computer and use it in GitHub Desktop.
Verlindo Git Merge
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
#!/bin/bash | |
NC="\033[0m" # No Color | |
ORANGE_W="\033[1;33m" | |
GREEN_W="\033[1;32m" | |
BUILD_DIR=../build | |
SRC_DIR=`pwd` | |
MESSAGE=`git log -1 --pretty=%B` | |
#echo -e "${ORANGE_W}Copiando arquivos para o build${NC}" | |
#cp -rv * $BUILD_DIR | |
echo -e "${ORANGE_W}Commitando mudanças no outro repositório${NC}" | |
cd .. | |
git add --all | |
git commit -am "$MESSAGE" | |
if [ 0 -eq $? ] | |
then | |
echo -e "${GREEN_W}Commit realizado com sucesso!${NC}" | |
fi | |
git push deploy_dev | |
if [ 0 -eq $? ] | |
then | |
cd ${SRC_DIR} | |
git checkout dev | |
if [ 0 -eq $? ] | |
then | |
echo -e "${GREEN_W}Deploy realizado com sucesso!${NC}" | |
fi | |
fi | |
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
#!/bin/bash | |
NC="\033[0m" # No Color | |
ORANGE_W="\033[1;33m" | |
GREEN_W="\033[1;32m" | |
BUILD_DIR=../build | |
SRC_DIR=`pwd` | |
MESSAGE=`git log -1 --pretty=%B` | |
#echo -e "${ORANGE_W}Copiando arquivos para o build${NC}" | |
#cp -rv * $BUILD_DIR | |
echo -e "${ORANGE_W}Commitando mudanças no outro repositório${NC}" | |
cd .. | |
git add --all | |
git commit -am "$MESSAGE" | |
if [ 0 -eq $? ] | |
then | |
echo -e "${GREEN_W}Commit realizado com sucesso!${NC}" | |
fi | |
git push deploy_dev | |
if [ 0 -eq $? ] | |
then | |
cd ${SRC_DIR} | |
git checkout dev | |
if [ 0 -eq $? ] | |
then | |
echo -e "${GREEN_W}Deploy realizado com sucesso!${NC}" | |
fi | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment