Browse Source

Make: přesunuty sync_test_media

Taky jsem smazal nějaké komentáře v Makefile_old, aby nepřekážely.
pull/11/head
Pavel 'LEdoian' Turinsky 2 years ago
parent
commit
5cfadf9236
  1. 8
      Makefile_old
  2. 9
      make/sync_test_media

8
Makefile_old

@ -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

9
make/sync_test_media

@ -0,0 +1,9 @@
#!/bin/bash
set -exuo pipefail
. make/lib.sh
gimli_only
only_in_dir "$TESTWEB"
rsync -av --delete "$PRODWEB/media/" ./media
Loading…
Cancel
Save