-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
88 lines (71 loc) · 2.92 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Composer
.PHONY: composer-install composer-update composer-install-dev composer-dump-auto composer-add-dep composer-add-dev-dep composer-interactive
.SILENT: composer-install composer-update composer-install-dev composer-dump-auto composer-add-dep composer-add-dev-dep composer-interactive
composer-install:
docker run --rm \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer install --ignore-platform-reqs --no-scripts ${DOWNLOAD_PROGRESS}
rm -f auth.json
composer-update:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer update --ignore-platform-reqs --no-scripts ${DOWNLOAD_PROGRESS}
rm -f auth.json
composer-install-dev:
docker run --rm --interactive --tty \
-v $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer install --ignore-platform-reqs --no-scripts --dev ${DOWNLOAD_PROGRESS}
rm -f auth.json
composer-dump-auto:
docker run --rm \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer dump-autoload
rm -f auth.json
composer-add-dep:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer /bin/bash -ci "composer require $(module) $(version) --ignore-platform-reqs --no-scripts"
rm -f auth.json
composer-add-dev-dep:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer /bin/bash -ci "composer require $(module) $(version) --dev --ignore-platform-reqs --no-scripts"
rm -f auth.json
composer-interactive:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/app \
--user $(id -u):$(id -g) \
composer /bin/bash
rm -f auth.json
# Static Analysis
.PHONY: phpcs
.SILENT: phpcs
phpcs:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/web/html \
--user $(id -u):$(id -g) \
xediltd/phpcs:latest
# Testing Tools
.PHONY: test unit-test integration-test
.SILENT: test unit-test integration-test
test:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/web/html \
--user $(id -u):$(id -g) \
xediltd/phpunit:latest vendor/bin/phpunit --testdox
unit-test:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/web/html \
--user $(id -u):$(id -g) \
xediltd/phpunit:latest vendor/bin/phpunit --testsuite Unit --testdox
integration-test:
docker run --rm --interactive --tty \
--volume $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))):/web/html \
--user $(id -u):$(id -g) \
xediltd/phpunit:latest vendor/bin/phpunit --testsuite Integration --testdox