makefile 819 Bytes
Newer Older
João Denis Rodrigues's avatar
João Denis Rodrigues committed
1 2 3 4 5 6 7 8 9 10 11 12 13
SITE-OWNER = www-data
SITE-OWNER-GROUP = www-data

all:


clean:
	@rm -rf *~ *.pyc *.backup

clean-deploy: clean
	@rm -rf static db.sqlite3

coverage:
14 15
	(cd src; coverage run --source='.' manage.py test; coverage html)
	mv src/htmlcov .
João Denis Rodrigues's avatar
João Denis Rodrigues committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


docs:
	@echo 'ainda não implementado'


deploy:
	python manage.py migrate
	python manage.py collectstatic -v0 --noinput
	chown $(SITE-OWNER):$(SITE-OWNER-GROUP) -R .

clean-docs:
	@rm -rf docs

install:
31 32
	apt-get update -qq
	apt-get install -y python3-dev python3-pip libpq-dev postgresql postgresql-contrib
Jomaro Rodrigues's avatar
Jomaro Rodrigues committed
33 34

install-user:
35
	pip3 install --user -U pip setuptools pipenv==9.0.3
36
	pipenv install
João Denis Rodrigues's avatar
João Denis Rodrigues committed
37 38


39 40 41 42 43 44 45 46 47 48

%:
	@:
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`

manage:
	@echo $(call args,"")
	sudo docker exec -it adega_web_1 python3 ./src/manage.py $(call args,"")