Pavel 'LEdoian' Turinsky
2 years ago
2 changed files with 18 additions and 8 deletions
@ -1,8 +0,0 @@ |
|||||
sync_prod_flatpages: venv_check |
|
||||
@echo Downloading current version of flatpages from mamweb-prod. |
|
||||
ssh mam-web@gimli.ms.mff.cuni.cz \ |
|
||||
"cd /akce/mam/www/mamweb-prod; . env/bin/activate; ./manage.py dumpdata flatpages --indent=2 > flat.json; ./fix_json.py flat.json flat_fixed.json" |
|
||||
rsync -ave ssh mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/flat_fixed.json data/flat.json |
|
||||
@echo "Applying downloaded flatpages." |
|
||||
./manage.py loaddata data/flat.json |
|
||||
@echo "Done." |
|
@ -0,0 +1,18 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
set -exuo pipefail |
||||
|
. make/lib.sh |
||||
|
|
||||
|
ensure_venv |
||||
|
|
||||
|
# TODO: This is very ugly, will fix in a future PR (hopefully) |
||||
|
ssh "$GIMLI_LOGIN" " |
||||
|
cd $PRODWEB |
||||
|
. env/bin/activate |
||||
|
./manage.py dumpdata flatpages --indent=2 > flat.json |
||||
|
./fix_json.py flat.json flat_fixed.json |
||||
|
" |
||||
|
rsync -ave ssh "$GIMLI_LOGIN:$PRODWEB/flat_fixed.json" data/flat.json |
||||
|
|
||||
|
./manage.py loaddata data/flat.json |
||||
|
|
Loading…
Reference in new issue