Skip to content

Fix makefile #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 1.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
.PHONY: check
check: lint cs tests phpstan

vendor: $(wildcard composer.lock) composer.json
composer update

build-cs/vendor:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still buggy - if build-cs/composer.lock changes, make build-cs/vendor will not update the dependencies correctly.

I wonder if these changes are worth it if it's so hard to get right 🤔

composer install --working-dir build-cs

.PHONY: tests
tests:
tests: vendor
php vendor/bin/phpunit

.PHONY: lint
lint:
lint: vendor
php vendor/bin/parallel-lint --colors --show-deprecated \
src tests

.PHONY: cs
cs:
composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs
cs: build-cs/vendor
php build-cs/vendor/bin/phpcs

.PHONY: cs-fix
cs-fix:
vendor/bin/phpcbf
cs-fix: build-cs/vendor
build-cs/vendor/bin/phpcbf

.PHONY: phpstan
phpstan:
phpstan: vendor
php vendor/bin/phpstan analyse -l 9 -c phpstan.neon src tests