-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (42 loc) · 1010 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
.PHONY: all distclean help lint lint-fix test vendor
PWD := $(shell pwd)
UID := $(shell id -u)
GID := $(shell id -g)
PLUGIN_NAME := $(notdir $(CURDIR))
PHP := sudo docker run --rm -it -v $(PWD):/$(PLUGIN_NAME) -w /$(PLUGIN_NAME) --user $(UID):$(GID) composer
all: test
try:
@$(PHP) php ./bin/cli.php compile ./src manifest.json
distclean:
@rm -rf vendor composer.lock
lint:
@$(PHP) ./vendor/bin/pint --test -v
lint-fix:
@$(PHP) ./vendor/bin/pint
test:
@$(PHP) ./vendor/bin/phpunit --testdox
vendor: distclean
@$(PHP) composer install
help:
@echo "Manage project"
@echo ""
@echo "Usage:"
@echo " $$ make [command]"
@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 distclean"
@echo " Delete installed dependencies"
@echo ""
@echo " $$ make test"
@echo " Run tests"
@echo ""
@echo " $$ make vendor"
@echo " Install dependencies"
@echo ""