2016-08-05 15:10:28 +02:00
|
|
|
DCV_IMAGE_NAME=pmsipilot/docker-compose-viz
|
|
|
|
|
|
|
|
COMPOSER ?= composer
|
|
|
|
COMPOSERFLAGS ?=
|
|
|
|
DOCKER ?= docker
|
|
|
|
PHP ?= php
|
|
|
|
|
2016-08-05 20:40:29 +02:00
|
|
|
.PHONY: clean docker test unit cs fix-cs
|
2016-08-05 15:10:28 +02:00
|
|
|
|
|
|
|
docker: docker.lock
|
|
|
|
|
2016-08-05 20:40:29 +02:00
|
|
|
test: vendor unit cs
|
|
|
|
|
|
|
|
unit: vendor
|
2016-08-05 18:16:45 +02:00
|
|
|
$(PHP) bin/kahlan --pattern='*.php' --reporter=verbose --persistent=false --cc=true
|
2016-08-05 15:10:28 +02:00
|
|
|
|
2016-08-05 20:40:29 +02:00
|
|
|
cs:
|
|
|
|
$(PHP) bin/php-cs-fixer fix --dry-run
|
|
|
|
|
|
|
|
fix-cs
|
|
|
|
$(PHP) bin/php-cs-fixer fix
|
|
|
|
|
2016-08-05 15:10:28 +02:00
|
|
|
clean:
|
|
|
|
rm -rf vendor/
|
|
|
|
|
|
|
|
docker.lock: Dockerfile vendor
|
|
|
|
$(COMPOSER) dump-autoload --classmap-authoritative
|
|
|
|
$(DOCKER) build -t $(DCV_IMAGE_NAME) .
|
|
|
|
touch docker.lock
|
|
|
|
|
|
|
|
ifndef COMPOSERFLAGS
|
|
|
|
vendor: composer.lock
|
|
|
|
$(COMPOSER) install --prefer-dist
|
|
|
|
else
|
|
|
|
vendor: composer.lock
|
|
|
|
$(COMPOSER) update $(COMPOSERFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
composer.lock: composer.json
|
|
|
|
$(COMPOSER) update $(COMPOSERFLAGS)
|