docker-compose-viz/Makefile
2016-08-05 20:51:29 +02:00

40 lines
760 B
Makefile

DCV_IMAGE_NAME=pmsipilot/docker-compose-viz
COMPOSER ?= composer
COMPOSERFLAGS ?=
DOCKER ?= docker
PHP ?= php
.PHONY: clean docker test unit cs fix-cs
docker: docker.lock
test: vendor unit cs
unit: vendor
$(PHP) bin/kahlan --pattern='*.php' --reporter=verbose --persistent=false --cc=true
cs:
$(PHP) bin/php-cs-fixer fix --dry-run
fix-cs:
$(PHP) bin/php-cs-fixer fix
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)