multimail/update.sh

26 lines
427 B
Bash
Raw Normal View History

2020-11-09 13:47:30 +00:00
#!/bin/bash
export DIR=$(dirname $0)
2020-11-09 13:47:30 +00:00
function prefix_date(){
while read line
do
echo [$(date)] $line
done
}
function run_update(){
cd $DIR
echo run autoupdate in $(pwd)
2020-11-09 13:47:30 +00:00
git pull
cd backend
2021-03-28 21:31:39 +00:00
source venv/bin/activate
2021-11-09 13:42:50 +00:00
python3 -m pip install --upgrade pip
2021-03-28 21:31:39 +00:00
pip3 install -r requirements.txt
2020-11-09 15:06:26 +00:00
python3 manage.py migrate
python3 manage.py collectstatic --noinput
2021-03-28 21:31:39 +00:00
echo done
2020-11-09 13:47:30 +00:00
}
run_update | prefix_date >> $DIR/update.log