|
@ -7,12 +7,6 @@ sync_prod_flatpages: venv_check |
|
|
./manage.py loaddata data/flat.json |
|
|
./manage.py loaddata data/flat.json |
|
|
@echo "Done." |
|
|
@echo "Done." |
|
|
|
|
|
|
|
|
# Sync test media directory with production |
|
|
|
|
|
sync_test_media: |
|
|
|
|
|
@if [ ${USER} != "mam-web" ]; then echo "Only possible by user mam-web"; exit 1; fi |
|
|
|
|
|
@if [ `readlink -f .` != "/aux/akce/mam/www/mamweb-test" ]; then echo "Only possible in /akce/mam/www/mamweb-test"; exit 1; fi |
|
|
|
|
|
rsync -av --delete /akce/mam/www/mamweb-prod/media/ ./media |
|
|
|
|
|
|
|
|
|
|
|
# Sync (with drop) test database with production database |
|
|
# Sync (with drop) test database with production database |
|
|
sync_test_db_aggressive: |
|
|
sync_test_db_aggressive: |
|
|
@if [ ${USER} != "mam-web" ]; then echo "Only possible by user mam-web"; exit 1; fi |
|
|
@if [ ${USER} != "mam-web" ]; then echo "Only possible by user mam-web"; exit 1; fi |
|
@ -25,6 +19,4 @@ sync_test_db_aggressive: |
|
|
psql mam_test -c "UPDATE django_site SET name='MaMweb (test)', domain='mam-test.ks.matfyz.cz' WHERE id=1" |
|
|
psql mam_test -c "UPDATE django_site SET name='MaMweb (test)', domain='mam-test.ks.matfyz.cz' WHERE id=1" |
|
|
@echo Done. |
|
|
@echo Done. |
|
|
|
|
|
|
|
|
# Sync test with production |
|
|
|
|
|
# HACK ALERT: using aggressive variant, due to the schemas being too different. |
|
|
|
|
|
sync_test: sync_test_media sync_test_db_aggressive |
|
|
sync_test: sync_test_media sync_test_db_aggressive |
|
|