1
0
mirror of https://github.com/kolaente/Simple-Git-Deploy.git synced 2023-09-04 21:52:08 +00:00

updated script

This commit is contained in:
konrad 2017-04-28 20:03:10 +02:00 committed by konrad
parent edf1f27af3
commit e737b64a07

View File

@ -39,27 +39,21 @@ if [ -z "$DEPLOY_DIR" ]
exit 1 exit 1
fi fi
#mkdir ${DEPLOY_DIR}_dep
rm -Rf /tmp/git-deploy rm -Rf /tmp/git-deploy
ssh-agent bash -c "ssh-add ${KEY}; git clone ${GIT_URL} /tmp/git-deploy" ssh-agent bash -c "ssh-add ${KEY}; git clone ${GIT_URL} /tmp/git-deploy"
rm -Rf /tmp/git-deploy/.git rm -Rf /tmp/git-deploy/.git
rm -Rf ${DEPLOY_DIR}/.* 2> /dev/null rm -Rf ${DEPLOY_DIR}/.* 2> /dev/null
rm -Rf ${DEPLOY_DIR}/* rm -Rf ${DEPLOY_DIR}/*
#sleep 1
mv -fT /tmp/git-deploy ${DEPLOY_DIR} mv -fT /tmp/git-deploy ${DEPLOY_DIR}
#cp -urfv /tmp/git-deploy/* ${DEPLOY_DIR}/* #cp -urfv /tmp/git-deploy/* ${DEPLOY_DIR}/*
rm -rf /tmp/git-deploy rm -rf /tmp/git-deploy
#echo $DCONTAINER_NAME
if [ ! -z "$DCONTAINER_NAME" ] if [ ! -z "$DCONTAINER_NAME" ]
then then
docker restart $DCONTAINER_NAME docker restart $DCONTAINER_NAME
fi fi
#[! -z "$DCONTAINER_NAME" ] && docker restart "$DCONTAINER_NAME"
echo "Finished at:" echo "Finished at:"
date date
echo "-----------------------------" echo "-----------------------------"