Skip to content

Instantly share code, notes, and snippets.

@halian-vilela
Created September 29, 2017 20:17
Show Gist options
  • Save halian-vilela/bb35b5aaa66eb6be056736dcf10e6bca to your computer and use it in GitHub Desktop.
Save halian-vilela/bb35b5aaa66eb6be056736dcf10e6bca to your computer and use it in GitHub Desktop.
Verlindo Git Merge
#!/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
#!/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