gradio/website/reload_website.sh
aliabid94 b4d9825409
Website: WIP (#328)
Ported gradio website into gradio repository, now launched as a docker service from gradio/website
2021-12-13 22:02:19 -08:00

16 lines
363 B
Bash
Executable File

#!/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