lib.itmens/misc/upgrade.sh

28 lines
756 B
Bash
Raw Normal View History

2023-01-14 12:39:43 +00:00
#!/bin/sh
[ -f manage.py ] || exit
2023-02-03 17:00:46 -05:00
echo Dry Run MakeMigrations:
python3 manage.py makemigrations --dry-run
echo Planned Migrations:
2023-01-14 12:39:43 +00:00
python3 manage.py migrate --plan
while true; do
read -p "Do you wish to continue? (yes/no) " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
esac
done
2023-01-29 20:05:30 -05:00
echo "Generating static files..."
2023-01-14 12:39:43 +00:00
python3 manage.py sass common/static/sass/boofilsic.sass common/static/css/boofilsic.min.css -t compressed || exit $?
python3 manage.py sass common/static/sass/boofilsic.sass common/static/css/boofilsic.css || exit $?
python3 manage.py collectstatic --noinput || exit $?
2023-01-29 20:05:30 -05:00
echo "Migrating database..."
2023-01-14 12:39:43 +00:00
python3 manage.py migrate || exit $?
2023-01-29 20:05:30 -05:00
echo "Checking..."
2023-01-14 12:39:43 +00:00
python3 manage.py check
2023-01-29 20:05:30 -05:00
echo "Done. You may reload app, worker and cron"