Test fichier deploy

This commit is contained in:
Anthony Dumas 2019-10-13 15:44:46 +00:00
parent a950909864
commit 760c6652cc

View File

@ -1,6 +1,7 @@
#!/bin/sh
cd /var/www/anthony-dumas
git fetch
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
@ -10,7 +11,9 @@ BASE=$(git merge-base @ "$UPSTREAM")
if [ $LOCAL = $REMOTE ]; then
echo "Up-to-date"
elif [ $LOCAL = $BASE ]; then
echo "Need to pull"
git stash
git pull
npm install
elif [ $REMOTE = $BASE ]; then
echo "Need to push"
else