Makefile
45 lines
| 1.2 KiB
| text/x-makefile
|
MakefileLexer
r912 | .DEFAULT_GOAL := help | |||
r132 | ||||
r832 | # set by: PATH_TO_OUTDATED_PACKAGES=/some/path/outdated_packages.py | |||
OUTDATED_PACKAGES = ${PATH_TO_OUTDATED_PACKAGES} | ||||
r132 | ||||
r912 | .PHONY: clean | |||
clean: ## full clean | ||||
r132 | make test-clean | |||
r642 | find . -type f \( -iname '*.c' -o -iname '*.pyc' -o -iname '*.so' -o -iname '*.orig' \) -exec rm '{}' ';' | |||
r132 | ||||
r912 | ||||
.PHONY: test | ||||
test: ## run test-clean and tests | ||||
r132 | make test-clean | |||
make test-only | ||||
r912 | ||||
.PHONY:test-clean | ||||
test-clean: ## run test-clean and tests | ||||
r132 | rm -rf coverage.xml htmlcov junit.xml pylint.log result | |||
find . -type d -name "__pycache__" -prune -exec rm -rf '{}' ';' | ||||
r912 | find . -type f \( -iname '.coverage.*' \) -exec rm '{}' ';' | |||
r132 | ||||
r912 | ||||
.PHONY: test-only | ||||
test-only: ## run tests | ||||
r642 | PYTHONHASHSEED=random \ | |||
py.test -x -vv -r xw -p no:sugar \ | ||||
r912 | --cov=vcsserver --cov-report=term-missing --cov-report=html \ | |||
vcsserver | ||||
r641 | ||||
r912 | ||||
.PHONY: generate-pkgs | ||||
generate-pkgs: ## generate new python packages | ||||
r641 | nix-shell pkgs/shell-generate.nix --command "pip2nix generate --licenses" | |||
r832 | ||||
r912 | ||||
.PHONY: pip-packages | ||||
pip-packages: ## show outdated packages | ||||
r832 | python ${OUTDATED_PACKAGES} | |||
r912 | ||||
.PHONY: help | ||||
help: | ||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-24s\033[0m %s\n", $$1, $$2}' | ||||