File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ SRCPATH := $(CURDIR )
2+ ENTRYPOINT := $(shell find $(SRCPATH ) -name '* .ini')
3+ PROJECTNAME := $(shell basename "$PWD")
4+
5+ define HELP
6+ Manage $(PROJECTNAME ) .
7+
8+ Usage:
9+
10+ make run - Run uWSGI server for $(PROJECTNAME ) .
11+ make restart - Purge cache & reinstall modules.
12+ make update - Update npm production dependencies.
13+ make clean - Remove cached files.
14+ endef
15+ export HELP
16+
17+ .PHONY : run restart update help
18+
19+ all help :
20+ @echo " $$ HELP"
21+
22+ .PHONY : run
23+ run :
24+ nohup uwsgi $(ENTRYPOINT ) &
25+
26+ .PHONY : restart
27+ restart :
28+ pkill -9 -f $(shell uwsgi $(ENTRYPOINT ) )
29+ nohup uwsgi $(ENTRYPOINT ) &
30+
31+ .PHONY : update
32+ update :
33+ git pull origin master
34+ pkill -9 -f $(shell uwsgi $(ENTRYPOINT ) )
35+ poetry shell
36+ poetry update
37+ nohup uwsgi $(ENTRYPOINT ) &
38+
39+ .PHONY : clean
40+ clean :
41+ find . -name ' *.pyc' -delete
42+ find . -name ' __pycache__' -delete
You can’t perform that action at this time.
0 commit comments