From 41786b050c84364cbd36e20bb296dab25c9b985c Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Fri, 6 Oct 2023 12:00:02 +0100 Subject: [PATCH] Allow 'make' to work first time --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a175843c..6fa53ed9 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ check: lint cs tests phpstan .PHONY: tests -tests: +tests: vendor php vendor/bin/phpunit .PHONY: lint -lint: +lint: vendor php vendor/bin/parallel-lint --colors \ src tests @@ -17,13 +17,19 @@ cs-install: composer install --working-dir build-cs .PHONY: cs -cs: +cs: cs-install php build-cs/vendor/bin/phpcs --standard=build-cs/phpcs.xml src tests .PHONY: cs-fix -cs-fix: +cs-fix: cs-install php build-cs/vendor/bin/phpcbf --standard=build-cs/phpcs.xml src tests .PHONY: phpstan -phpstan: +phpstan: vendor php vendor/bin/phpstan analyse -l 8 -c phpstan.neon src tests + +vendor: composer.json composer.lock + composer --no-interaction install + +composer.lock: + test -f composer.lock || composer --no-interaction update