diff --git a/.gitignore b/.gitignore index 097ef35..afadc1d 100644 --- a/.gitignore +++ b/.gitignore @@ -203,3 +203,4 @@ dmypy.json .pyre/ backend/config/ +update.log diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..cc04f4b --- /dev/null +++ b/update.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +DIR=$(dirname $0) + +function prefix_date(){ + while read line + do + echo [$(date)] $line + done +} + +function run_update(){ + git pull + cd backend + python manage.py migrate +} + +run_update | prefix_date > $DIR/update.log