-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
72 lines (50 loc) · 1.09 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
### BEGIN main targets
.PHONY: build
build: vendor
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
### END
### BEGIN secondary targets
.PHONY: vendor
vendor: vendor/lock
vendor/lock: composer.json
$(MAKE) validate-composer
$(MAKE) update
touch vendor/lock
.PHONY: update
update:
composer update
### END
### BEGIN tests
.PHONY: test
test:
vendor/bin/phpunit $(PHPUNIT_ARGS)
.PHONY: lint
lint:
vendor/bin/parallel-lint src/ tests/
.PHONY: cs
cs: vendor
vendor/bin/phpcs $(PHPCS_ARGS)
.PHONY: cs-fix
cs-fix: vendor
vendor/bin/phpcbf
.PHONY: phpstan
phpstan: vendor
vendor/bin/phpstan analyse
.PHONY: validate-composer
validate-composer:
composer validate --strict
.PHONY: check
check: build validate-composer lint cs phpstan test
### END
### BEGIN cleaning
.PHONY: clean
clean: clean-cache clean-vendor
.PHONY: clean-cache
clean-cache:
rm -rf var/cache/*
.PHONY: clean-vendor
clean-vendor:
rm -rf vendor
### END