forked from pmsipilot/docker-compose-viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 816 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 bin/entrypoint.sh vendor src/application.php src/functions.php
$(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)