-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·43 lines (31 loc) · 1.49 KB
/
Makefile
File metadata and controls
executable file
·43 lines (31 loc) · 1.49 KB
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
DOCKER =
composer/install: ## Launch composer install
@$(DOCKER) php -d memory_limit=-1 /usr/local/bin/composer install --no-interaction --no-scripts
composer/update: ## Launch composer update
@$(DOCKER) php -d memory_limit=-1 /usr/local/bin/composer update --no-interaction --no-scripts
cs/dry-run: ## Run PHPCS with dry-run option
@$(DOCKER) ./bin/php-cs-fixer-v3.phar fix src --dry-run --verbose --diff
@$(DOCKER) ./bin/php-cs-fixer-v3.phar fix tests --dry-run --verbose --diff
cs/fix: ## Run PHPCS with automatic fix
@$(DOCKER) ./bin/php-cs-fixer-v3.phar fix src --verbose --diff
@$(DOCKER) ./bin/php-cs-fixer-v3.phar fix tests --verbose --diff
phpunit/filter: ### Run phpunit with --filter PHPUNIT_TEST
@$(DOCKER) php -d memory_limit=-1 ./vendor/bin/phpunit --filter $(PHPUNIT_TEST)
phpunit/all: ### Run phpunit with options as PHPUNIT_OPTIONS
@$(DOCKER) php -d memory_limit=-1 ./vendor/bin/phpunit $(PHPUNIT_OPTIONS)
.PHONY: help cs phpunit
HELP_FUNCTION = \
%help; \
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-\/]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
print "usage: make [target]\n\n"; \
for (sort keys %help) { \
for (@{$$help{$$_}}) { \
$$sep = " " x (32 - length $$_->[0]); \
print " \033[0;33m$$_->[0]\033[0;37m$$sep\033[0;32m$$_->[1]\033[0;37m\n"; \
}; \
print "\n"; }
.DEFAULT_GOAL := help
help: ##@other Show this help.
@$(DOCKER) perl -e '$(HELP_FUNCTION)' $(MAKEFILE_LIST)
ERR = $(error found an error!)
err: ; $(ERR)