modif du makefile pour relancer le code apres publication

pull/14/head
Vincent Adolphe 2014-12-10 22:54:43 +01:00
Parent c99356b7a1
révision b4fd449424
2 fichiers modifiés avec 15 ajouts et 7 suppressions

Voir le fichier

@ -1,18 +1,25 @@
DJANGO_LISTEN?=0.0.0.0:8024
PYTHON=python
CHECK_PROJET_DIR=grapes_c21
CHECK_PROJ_NAME=grapes
TARGET_RSYNC=$(TARGET_HOST):$(TARGET_DIR)/$(PROJ_NAME)
TARGET_WSGI=$(TARGET_DIR)/public/$(PROJ_NAME).wsgi
check_env:
@test "x$(PROJET_DIR)" = "x$(CHECK_PROJET_DIR)" || { \
@test "x$(PROJ_NAME)" = "x$(CHECK_PROJ_NAME)" || { \
echo "missing .env please source it" ; exit 1 ; }
serve: check_env
$(PYTHON) manage.py runserver $(DJANGO_LISTEN)
test: check_env
@echo $(PYTHON) manage.py test
publish: test
publish_only: test
rsync $(DRYRUN) -i --stats --fuzzy -av --delete --exclude-from='.rsyncignore' ./ $(TARGET_RSYNC)
touch: check_env
ssh $(TARGET_HOST) touch $(TARGET_WSGI)
publish: publish_only touch
# EOF

Voir le fichier

@ -1,5 +1,6 @@
# suit to your needs and copy as .env
export PROJET_DIR=apes_c21
export PROJ_NAME=grapes
export PYTHONPATH=/opt/django1.2
export DJANGO_SETTINGS_MODULE=settings
export TARGET_RSYNC=user@host:directory
export TARGET_HOST=user@host
export TARGET_DIR=directory