-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
106 lines (89 loc) · 2.13 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.PHONY: all clean docker-build docker-images help lint lint-fix repl shell test test-static test-unit bump bump-dev process-reports
IMAGE ?= php_8_3
PHP = docker compose run --rm php
all: test
vendor:
$(PHP) composer install
clean:
$(PHP) rm -rf vendor composer.lock
lint: vendor
$(PHP) composer lint
lint-fix: vendor
$(PHP) composer lint-fix
test: vendor
$(PHP) composer test
test-static: vendor
$(PHP) composer test:static
test-unit: vendor
$(PHP) composer test:unit
repl: vendor
$(PHP) composer repl
shell:
$(PHP) bash
bump: vendor
$(PHP) composer project:bump
bump-dev: vendor
$(PHP) composer project:bump-dev
process-reports:
$(PHP) bash -c "test -e build/logs/clover.xml && sed -i 's/\/app\///' build/logs/clover.xml"
docker-build:
docker-compose build php
docker-images:
@$(PHP) bash -c "cd docker/image && ls ."
help:
@echo "Manage project"
@echo ""
@echo "Usage:"
@echo " $$ make [command] ["
@echo " IMAGE=<image>"
@echo " ]"
@echo ""
@echo "Commands:"
@echo ""
@echo " $$ make lint"
@echo " Lint code style"
@echo ""
@echo " $$ make lint-fix"
@echo " Lint and fix code style"
@echo ""
@echo " $$ make test"
@echo " Run linter, static and unit tests"
@echo ""
@echo " $$ make test-unit"
@echo " Run unit tests"
@echo ""
@echo " $$ make test-static"
@echo " Run static tests"
@echo ""
@echo " $$ make repl"
@echo " Launch read-print-eval loop"
@echo ""
@echo " $$ make shell"
@echo " Login into the container"
@echo ""
@echo " $$ make bump"
@echo " Bump version"
@echo ""
@echo " $$ make bump-dev"
@echo " Bump development version"
@echo ""
@echo " $$ make clean"
@echo " Delete installed dependencies"
@echo ""
@echo " $$ make vendor"
@echo " Install dependencies"
@echo ""
@echo " $$ make process-reports"
@echo " Formats test reports to use relative local file paths"
@echo ""
@echo " $$ make docker-images"
@echo " Lists available Docker images"
@echo ""
@echo " $$ make docker-build"
@echo " Re-builds the Docker image"
@echo ""
@echo "Environment variables:"
@echo ""
@echo " IMAGE"
@echo " Docker image that is used to run the command"
@echo ""