diff options
author | Étienne Loks <etienne@peacefrogs.net> | 2019-08-26 13:07:01 +0200 |
---|---|---|
committer | Étienne Loks <etienne@peacefrogs.net> | 2019-08-26 13:07:01 +0200 |
commit | 87b2f787b3305984c60c658bd0754cb65107a596 (patch) | |
tree | 0d81295835e5ad3c7cb5098728e2da462325e927 | |
parent | 5fcca1393cbbaae98069294f659a7a3a34d1ae0a (diff) | |
download | ishtar-pergamon-87b2f787b3305984c60c658bd0754cb65107a596.tar.bz2 ishtar-pergamon-87b2f787b3305984c60c658bd0754cb65107a596.zip |
Improve Makefile help
-rw-r--r-- | Makefile.example | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/Makefile.example b/Makefile.example index 8932731..e3af7ac 100644 --- a/Makefile.example +++ b/Makefile.example @@ -1,51 +1,45 @@ SHELL := /bin/bash PYTHON=python3 +APPS="home" "showcase" "ishtar_public" +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) -help: - # Actions available: - # * clean: remove temporary files - # * compilemessages: compile messages to be translated - # * makemessages: create messages to be translated - # * run: run local test server (port 9000) - # * sass: compile scss file - # * shell: launch a python shell with project context preloaded - # * soft_test: launch tests without db reinitialization - # * test: launch tests -clean: +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 +test: clean ## launch tests $(PYTHON) manage.py test -soft_test: clean +soft_test: clean ## launch tests without db reinitialization $(PYTHON) manage.py test -k -migrations: +migrations: ## create new DB migrations $(PYTHON) manage.py makemigrations -migrate: +migrate: ## migrate DB $(PYTHON) manage.py migrate -shell: +shell: ## launch a python shell with project context preloaded $(PYTHON) manage.py shell -run: +run: ## run local test server (port 9000) $(PYTHON) manage.py runserver 0.0.0.0:9000 -sass: - ./node_modules/node-sass/bin/node-sass scss/ishtar_public.scss --output-style compressed > ishtar_public/static/css/ishtar_public.css +sass: ## compile sass files + ./node_modules/node-sass/bin/node-sass scss/pergamon.scss --output-style compressed > pergamon/static/css/pergamon.css -makemessages: - $(PYTHON) manage.py makemessages +makemessages: ## create messages to be translated + for DIR in $(APPS); do \ + cd $(CURDIR)/$$DIR; \ + $(PYTHON) ../manage.py makemessages --all; \ + done -compilemessages: +compilemessages: ## compile messages to be translated $(PYTHON) manage.py compilemessages - - |