Úprava sync_prod_flatpages pro správný postup úpravy flatpagů

This commit is contained in:
Tomas "Jethro" Pokorny 2021-11-22 22:59:33 +01:00
parent a058229649
commit ea5ff61438

View file

@ -102,10 +102,10 @@ deploy_prod: venv_check
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"
rsync -ave ssh mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/flat.json ./flat.json
"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 flat.json
./manage.py loaddata data/flat.json
@echo "Done."
# Sync test media directory with production