Make: přesunuty sync_test_media
Taky jsem smazal nějaké komentáře v Makefile_old, aby nepřekážely.
This commit is contained in:
		
							parent
							
								
									0458abb419
								
							
						
					
					
						commit
						5cfadf9236
					
				
					 2 changed files with 9 additions and 8 deletions
				
			
		|  | @ -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 | ||||||
|  |  | ||||||
|  | @ -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…
	
		Reference in a new issue
	
	 Pavel 'LEdoian' Turinsky
						Pavel 'LEdoian' Turinsky