Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Enhancement: Introduce build and help targets #1761

Merged
merged 4 commits into from
Aug 25, 2019
Merged
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: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
vendor/autoload.php:
composer install --no-interaction --prefer-dist
.PHONY: build fix help sniff test

help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

build: fix test ## Runs fix and test targets

.PHONY: fix
fix: vendor/autoload.php
fix: vendor/autoload.php ## Fixes code style issues with phpcbf
vendor/bin/phpcbf --standard=PSR2 src

.PHONY: sniff
sniff: vendor/autoload.php
sniff: vendor/autoload.php ## Detects code style issues with phpcs
vendor/bin/phpcs --standard=PSR2 src -n

.PHONY: test
test: vendor/autoload.php
test: vendor/autoload.php ## Runs tests with phpunit
vendor/bin/phpunit --verbose

vendor/autoload.php:
composer install --no-interaction --prefer-dist