Skip to content

Commit

Permalink
Makefile: modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Sep 2, 2021
1 parent 70da39a commit b831618
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions Makefile
@@ -1,27 +1,24 @@
.PHONY: qa lint cs csf phpstan tests coverage
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html

all:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
install:
composer update

vendor: composer.json composer.lock
composer install
qa: phpstan cs

qa: lint phpstan cs

lint: vendor
vendor/bin/linter src tests

cs: vendor
cs:
vendor/bin/codesniffer src tests

csf: vendor
csf:
vendor/bin/codefixer src tests

phpstan: vendor
phpstan:
vendor/bin/phpstan analyse -l max -c phpstan.neon src

tests: vendor
tests:
vendor/bin/tester -s -p php --colors 1 -C tests/cases

coverage: vendor
coverage-clover:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases

coverage-html:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases

0 comments on commit b831618

Please sign in to comment.