##// END OF EJS Templates
makefile: added dev-srv command to run the server app
super-admin -
r1104:879da4f3 python3
parent child Browse files
Show More
@@ -1,96 +1,103 b''
1 1 #SHELL = /bin/bash
2 2
3 3 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
4 4 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
5 5
6 6 .PHONY: clean
7 7 ## Cleanup compiled and cache py files
8 8 clean:
9 9 make test-clean
10 10 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
11 11
12 12
13 13 .PHONY: test
14 14 ## run test-clean and tests
15 15 test:
16 16 make test-clean
17 17 make test-only
18 18
19 19
20 20 .PHONY: test-clean
21 21 ## run test-clean and tests
22 22 test-clean:
23 23 rm -rf coverage.xml htmlcov junit.xml pylint.log result
24 24 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
25 25 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
26 26
27 27
28 28 .PHONY: test-only
29 29 ## Run tests only without cleanup
30 30 test-only:
31 31 PYTHONHASHSEED=random \
32 32 py.test -x -vv -r xw -p no:sugar \
33 33 --cov-report=term-missing --cov-report=html --cov=vcsserver vcsserver
34 34
35 35
36 36 .PHONY: pip-packages
37 37 ## Show outdated packages
38 38 pip-packages:
39 39 python ${OUTDATED_PACKAGES}
40 40
41 41
42 42 .PHONY: build
43 43 ## Build sdist/egg
44 44 build:
45 45 python -m build
46 46
47 47
48 48 .PHONY: dev-env
49 49 ## make dev-env based on the requirements files and install develop of packages
50 50 dev-env:
51 51 pip install build virtualenv pipdeptree
52 52 pip wheel --wheel-dir=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt
53 53 pip install --no-index --find-links=/home/rhodecode/.cache/pip/wheels -r requirements.txt -r requirements_test.txt -r requirements_debug.txt
54 54 pip install -e .
55 55
56
57 .PHONY: dev-srv
58 ## run develop server instance
59 dev-srv:
60 pserve --reload .dev/dev.ini
61
62
56 63 # Default command on calling make
57 64 .DEFAULT_GOAL := show-help
58 65
59 66 .PHONY: show-help
60 67 show-help:
61 68 @echo "$$(tput bold)Available rules:$$(tput sgr0)"
62 69 @echo
63 70 @sed -n -e "/^## / { \
64 71 h; \
65 72 s/.*//; \
66 73 :doc" \
67 74 -e "H; \
68 75 n; \
69 76 s/^## //; \
70 77 t doc" \
71 78 -e "s/:.*//; \
72 79 G; \
73 80 s/\\n## /---/; \
74 81 s/\\n/ /g; \
75 82 p; \
76 83 }" ${MAKEFILE_LIST} \
77 84 | LC_ALL='C' sort --ignore-case \
78 85 | awk -F '---' \
79 86 -v ncol=$$(tput cols) \
80 87 -v indent=19 \
81 88 -v col_on="$$(tput setaf 6)" \
82 89 -v col_off="$$(tput sgr0)" \
83 90 '{ \
84 91 printf "%s%*s%s ", col_on, -indent, $$1, col_off; \
85 92 n = split($$2, words, " "); \
86 93 line_length = ncol - indent; \
87 94 for (i = 1; i <= n; i++) { \
88 95 line_length -= length(words[i]) + 1; \
89 96 if (line_length <= 0) { \
90 97 line_length = ncol - indent - length(words[i]) - 1; \
91 98 printf "\n%*s ", -indent, " "; \
92 99 } \
93 100 printf "%s ", words[i]; \
94 101 } \
95 102 printf "\n"; \
96 103 }'
General Comments 0
You need to be logged in to leave comments. Login now