-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 779 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 779 Bytes
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
PHP=php
COMPOSER=composer
PLANTUML=docker run --rm --user $$(id -u):$$(id -g) -v ./:/data/ plantuml/plantuml
WSD_FILES=$(wildcard docs/*.wsd)
.PHONY: test
test: dump phpstan psalm phpunit
.PHONY: dump
dump:
$(COMPOSER) dump-autoload --optimize
.PHONY: phpstan
phpstan:
$(PHP) vendor/bin/phpstan analyse
.PHONY: psalm
psalm:
$(PHP) vendor/bin/psalm
.PHONY: phpunit
phpunit:
$(eval c ?=)
rm -rf var
$(PHP) vendor/bin/phpunit $(c)
.PHONY: php-cs-fixer
php-cs-fixer: tools/php-cs-fixer
$(PHP) $< fix --config=.php-cs-fixer.dist.php --verbose --allow-risky=yes
.PHONY: tools/php-cs-fixer
tools/php-cs-fixer:
phive install php-cs-fixer
.PHONY: docs/%.svg
docs/%.svg: docs/%.wsd
$(PLANTUML) -tsvg $< -o ./
.PHONY: diagrams
diagrams: $(WSD_FILES:docs/%.wsd=docs/%.svg)