-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (39 loc) · 1.3 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
BUILD_ID ?= 20
COMPOSER_BIN ?= $(shell which composer)
ESBUILD_TARGET_DIRECTORY ?= public/build
PHP_BIN ?= $(shell which php)
SHELL_PWD := $(shell pwd)
# -----------------------------------------------------------------------------
# Real targets
# -----------------------------------------------------------------------------
tools/php-cs-fixer/vendor/bin/php-cs-fixer:
$(MAKE) -C tools/php-cs-fixer vendor
tools/psalm/vendor/bin/psalm:
$(MAKE) -C tools/psalm vendor
vendor: composer.lock
${PHP_BIN} ${COMPOSER_BIN} install --no-interaction --prefer-dist --optimize-autoloader;
touch vendor;
# -----------------------------------------------------------------------------
# Phony targets
# -----------------------------------------------------------------------------
.PHONY: fmt
fmt: php-cs-fixer
.PHONY: php-cs-fixer
php-cs-fixer: tools/php-cs-fixer/vendor/bin/php-cs-fixer
./tools/php-cs-fixer/vendor/bin/php-cs-fixer --allow-risky=yes fix
.PHONY: phpunit
phpunit: vendor
./vendor/bin/phpunit
.PHONY: psalm
psalm: tools/psalm/vendor/bin/psalm
./tools/psalm/vendor/bin/psalm \
--no-cache \
--show-info=true \
--root=$(CURDIR)
.PHONY: psalm.watch
psalm.watch: node_modules vendor
./node_modules/.bin/nodemon \
--ext ini,php \
--signal SIGTERM \
--watch ./src \
--exec '$(MAKE) psalm || exit 1'