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\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