-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
58 lines (39 loc) · 961 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
COMPOSER_ARGS += --no-interaction --no-progress --no-suggest
### BEGIN main targets
.PHONY: build
build: vendor
@echo "Build successfully done."
.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
composer update $(COMPOSER_ARGS)
touch vendor/lock
### END
### BEGIN tests
.PHONY: test
test:
vendor/bin/phpunit $(PHPUNIT_ARGS)
.PHONY: cs
cs:
vendor/bin/phpcs $(PHPCS_ARGS)
.PHONY: fix
fix:
vendor/bin/phpcbf
.PHONY: static-analysis
static-analysis:
vendor/bin/phpstan $(PHPSTAN_ARGS)
.PHONY: check
check: build cs static-analysis test
### END
### BEGIN cleaning
.PHONY: clean
clean: clean-vendor
.PHONY: clean-vendor
clean-vendor:
rm -rf vendor composer.lock
### END