modif du makefile pour relancer le code apres publication
Parent
c99356b7a1
révision
b4fd449424
17
Makefile
17
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket