blob: 3a93ded00df760ca1351b950ad6a09f01f6a4042 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
SHELL := /bin/bash
CURRENT_APP="drassm_showcase"
PYTHON=python3
APPS="home" "showcase" "pergamon"
help: ## display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
clean: ## remove temporary files
-rm -rf *~*
-find . -name '*.pyc' -exec rm {} \;
-find . -name '.*.swp' -exec rm {} \;
-find . -name '__pycache__' -exec rm -rf {} \; 2> /dev/null
-rm -rf dist ishtar.egg-info
test: clean ## launch tests
$(PYTHON) manage.py test
soft_test: clean ## launch tests without db reinitialization
$(PYTHON) manage.py test -k
migrations: ## create new DB migrations
$(PYTHON) manage.py makemigrations
migrate: ## migrate DB
$(PYTHON) manage.py migrate
shell: ## launch a python shell with project context preloaded
$(PYTHON) manage.py shell
run: ## run local test server (port 9000)
$(PYTHON) manage.py runserver 0.0.0.0:9000
sass: ## compile sass files
./node_modules/node-sass/bin/node-sass scss/pergamon.scss --output-style compressed > $(CURRENT_APP)/static/css/pergamon.css
makemessages: ## create messages to be translated
for DIR in $(APPS); do \
cd $(CURDIR)/$$DIR; \
$(PYTHON) ../manage.py makemessages --all; \
done
compilemessages: ## compile messages to be translated
$(PYTHON) manage.py compilemessages
collectstatic: ## collect static files in the Django project to be served
$(PYTHON) manage.py collectstatic
|