curriculum/deploy.sh

15 lines
233 B
Bash
Raw Normal View History

2019-10-13 14:36:36 +00:00
#!/bin/sh
2019-10-13 15:28:52 +00:00
cd /var/www/anthony-dumas
2019-10-13 14:36:36 +00:00
UPSTREAM=${1:-'@{u}'}
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse "$UPSTREAM")
BASE=$(git merge-base @ "$UPSTREAM")
if [ $LOCAL = $BASE ]; then
git stash
git pull
npm install
fi