-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
29 lines (19 loc) · 948 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
.PHONY: all test composer clean clean-docker-image clean-composer-vendor
composer = composer:2
phpcli = php:8
all: composer test
test: composer
docker run -it --rm -v "${CURDIR}":/usr/src/myapp -w /usr/src/myapp ${phpcli} php ./vendor/phpunit/phpunit/phpunit tests
composer:
docker run --rm -v ${CURDIR}:/app -v ~/.ssh:/root/.ssh $(composer) install
composer-update: composer
docker run --rm -v ${CURDIR}:/app -v ~/.ssh:/root/.ssh $(composer) update
clean: clean-composer-vendor clean-docker-image
clean-docker-image:
docker rmi $(composer) $(phpcli)
clean-composer-vendor:
docker run --rm -v ${PWD}:/app ${composer} exec "rm -rf vendor"
cs-check: composer
docker run -it --rm -v "${CURDIR}":/usr/src/myapp -w /usr/src/myapp ${phpcli} php ./vendor/bin/phpcs --standard=PSR12 src tests
cs-fix: composer
docker run -it --rm -v "${CURDIR}":/usr/src/myapp -w /usr/src/myapp ${phpcli} php ./vendor/bin/phpcbf --standard=PSR12 src tests