mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
16 lines
363 B
Bash
16 lines
363 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
UPSTREAM=${1:-'@{u}'}
|
||
|
LOCAL=$(git rev-parse @)
|
||
|
REMOTE=$(git rev-parse "$UPSTREAM")
|
||
|
BASE=$(git merge-base @ "$UPSTREAM")
|
||
|
|
||
|
if [ $LOCAL = $REMOTE ]; then
|
||
|
echo "Up-to-date. No restart."
|
||
|
elif [ $LOCAL = $BASE ]; then
|
||
|
echo "Restarting..."
|
||
|
git pull
|
||
|
python refresh_google_credentials.py
|
||
|
docker-compose build
|
||
|
docker-compose restart -d
|
||
|
fi
|