Browse Source

Update guardu u make deploy_*

remotes/origin/Float_novinky
Tomas Gavenciak 9 years ago
parent
commit
7b0497a1d2
  1. 12
      Makefile

12
Makefile

@ -60,7 +60,8 @@ schema_all.pdf:
# Deploy to current *mamweb-test* directory
deploy_test:
@if [[ `pwd` != "/akce/MaM/WWW/mamweb-test" ]]; then echo "Only possible in /akce/MaM/WWW/mamweb-test"; exit 1; fi
@if [ ${USER} != "www-mam" ]; then echo "Only possible by user www-mam"; exit 1; fi
@if [ `pwd` != "/akce/MaM/WWW/mamweb-test" ]; then echo "Only possible in /akce/MaM/WWW/mamweb-test"; exit 1; fi
@echo "Installing version from origin/master ..."
git pull origin master
git clean -f
@ -68,13 +69,15 @@ deploy_test:
./manage.py migrate
./manage.py collectstatic --noinput
(chown -Rf :mam . || true )
(chmod -Rf g+rwX . || true )
(chmod -Rf g+rX . || true )
(chmod -Rf g+rwX ./media/ || true )
touch mamweb/wsgi.py
@echo Done.
# Deploy to current *mamweb-prod* directory
deploy_prod:
@if [[ `pwd` != "/akce/MaM/WWW/mamweb-prod" ]]; then echo "Only possible in /akce/MaM/WWW/mamweb-prod"; exit 1; fi
@if [ ${USER} != "www-mam" ]; then echo "Only possible by user www-mam"; exit 1; fi
@if [ `pwd` != "/akce/MaM/WWW/mamweb-prod" ]; then echo "Only possible in /akce/MaM/WWW/mamweb-prod"; exit 1; fi
@echo "Backing up production DB ..."
( cd .. && ./backup_prod_db.sh )
@echo "Installing version from origin/stable ..."
@ -84,7 +87,8 @@ deploy_prod:
./manage.py migrate
./manage.py collectstatic --noinput
(chown -Rf :mam . || true )
(chmod -Rf g+rwX . || true )
(chmod -Rf g+rX . || true )
(chmod -Rf g+rwX ./media/ || true )
touch mamweb/wsgi.py
@echo Done.

Loading…
Cancel
Save