##// END OF EJS Templates
makefile: updated
milka -
r4617:cfe99c5e default
parent child Browse files
Show More
@@ -1,69 +1,98 b''
1 .DEFAULT_GOAL := help
1 2
2 .PHONY: clean docs docs-clean docs-cleanup test test-clean test-only test-only-postgres test-only-mysql web-build generate-pkgs pip-packages
3 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
4 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
3 5
4 6 NODE_PATH=./node_modules
5 7 WEBPACK=./node_binaries/webpack
6 8 GRUNT=./node_binaries/grunt
7 # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py
8 OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES}
9 9
10 clean:
10 .PHONY: clean
11 clean: ## full clean
11 12 make test-clean
12 13 find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';'
13 14
14 test:
15
16 .PHONY: test
17 test: ## run test-clean and tests
15 18 make test-clean
16 19 make test-only
17 20
18 test-clean:
21
22 .PHONY:test-clean
23 test-clean: ## run test-clean and tests
19 24 rm -rf coverage.xml htmlcov junit.xml pylint.log result
20 25 find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';'
21 26 find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';'
22 27
23 test-only:
28
29 .PHONY: test-only
30 test-only: ## run tests
24 31 PYTHONHASHSEED=random \
25 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
26 --cov-report=term-missing --cov-report=html \
32 py.test -x -vv -r xw -p no:sugar \
33 --cov=rhodecode --cov-report=term-missing --cov-report=html \
27 34 rhodecode
28 35
29 test-only-mysql:
36
37 .PHONY: test-only-mysql
38 test-only-mysql: ## run tests against mysql
30 39 PYTHONHASHSEED=random \
31 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
32 --cov-report=term-missing --cov-report=html \
40 py.test -x -vv -r xw -p no:sugar \
41 --cov=rhodecode --cov-report=term-missing --cov-report=html \
33 42 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "mysql://root:qweqwe@localhost/rhodecode_test?charset=utf8"}}' \
34 43 rhodecode
35 44
36 test-only-postgres:
45
46 .PHONY: test-only-postgres
47 test-only-postgres: ## run tests against postgres
37 48 PYTHONHASHSEED=random \
38 py.test -x -vv -r xw -p no:sugar --cov=rhodecode \
39 --cov-report=term-missing --cov-report=html \
49 py.test -x -vv -r xw -p no:sugar \
50 --cov=rhodecode --cov-report=term-missing --cov-report=html \
40 51 --ini-config-override='{"app:main": {"sqlalchemy.db1.url": "postgresql://postgres:qweqwe@localhost/rhodecode_test"}}' \
41 52 rhodecode
42 53
43
44 docs:
54 .PHONY: docs
55 docs: ## build docs
45 56 (cd docs; nix-build default.nix -o result; make clean html)
46 57
47 docs-clean:
58
59 .PHONY: docs-clean
60 docs-clean: ## Cleanup docs
48 61 (cd docs; make clean)
49 62
50 docs-cleanup:
63
64 .PHONY: docs-cleanup
65 docs-cleanup: ## Cleanup docs
51 66 (cd docs; make cleanup)
52 67
53 web-build:
68
69 .PHONY: web-build
70 web-build: ## Build static/js
54 71 NODE_PATH=$(NODE_PATH) $(GRUNT)
55 72
56 generate-pkgs:
73
74 .PHONY: generate-pkgs
75 generate-pkgs: ## generate new python packages
57 76 nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses"
58 77
59 pip-packages:
78
79 .PHONY: pip-packages
80 pip-packages: ## show outdated packages
60 81 python ${OUTDATED_PACKAGES}
61 82
62 generate-js-pkgs:
83
84 .PHONY: generate-js-pkgs
85 generate-js-pkgs: ## generate js packages
63 86 rm -rf node_modules && \
64 87 nix-shell pkgs/shell-generate.nix --command "node2nix --input package.json -o pkgs/node-packages.nix -e pkgs/node-env.nix -c pkgs/node-default.nix -d --flatten --nodejs-8" && \
65 88 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
66 89
67 generate-license-meta:
90
91 .PHONY: generate-license-meta
92 generate-license-meta: ## Generate license metadata
68 93 nix-build pkgs/license-generate.nix -o result-license && \
69 cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json No newline at end of file
94 cat result-license/licenses.json | python -m json.tool > rhodecode/config/licenses.json
95
96 .PHONY: help
97 help:
98 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-24s\033[0m %s\n", $$1, $$2}'
General Comments 0
You need to be logged in to leave comments. Login now