forked from yiisoft/yii-auth-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
100 lines (80 loc) · 2.04 KB
/
Makefile
File metadata and controls
100 lines (80 loc) · 2.04 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.DEFAULT_GOAL := help
CLI_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(CLI_ARGS):;@:)
PRIMARY_GOAL := $(firstword $(MAKECMDGOALS))
#
# Targets
#
ifeq ($(PRIMARY_GOAL),p)
p: ## Run PHP Psalm
php vendor/bin/psalm
endif
ifeq ($(PRIMARY_GOAL),pf)
pf: ## Run PHP Psalm on a specific file
ifndef FILE
$(error Please provide FILE, e.g. 'make pf FILE=src/Foo.php')
endif
php vendor/bin/psalm "$(FILE)"
endif
ifeq ($(PRIMARY_GOAL),pc)
pc: ## Clear Psalm's cache
php vendor/bin/psalm --clear-cache
endif
ifeq ($(PRIMARY_GOAL),pu)
pu: ## Run PHPUnit tests
php vendor/bin/phpunit
endif
ifeq ($(PRIMARY_GOAL),ric)
ric: ## Roave Infection Covered
php vendor/bin/roave-infection-static-analysis-plugin --only-covered --min-msi=92
endif
ifeq ($(PRIMARY_GOAL),riu)
riu: ## Roave Infection Uncovered
php vendor/bin/roave-infection-static-analysis-plugin --min-msi=92
endif
ifeq ($(PRIMARY_GOAL),i)
i: ## Infection Mutation Test
php vendor/bin/infection
endif
ifeq ($(PRIMARY_GOAL),co)
co: ## Composer outdated
composer outdated
endif
ifeq ($(PRIMARY_GOAL),cwn)
cwn: ## Composer why-not
ifndef REPO
$(error Please provide REPO, e.g. 'make cwn REPO=yiisoft/yii-demo VERSION=1.1.1')
endif
ifndef VERSION
$(error Please provide VERSION, e.g. 'make cwn REPO=yiisoft/yii-demo VERSION=1.1.1')
endif
composer why-not $(REPO) $(VERSION)
endif
ifeq ($(PRIMARY_GOAL),cu)
cu: ## Composer update
composer update
endif
ifeq ($(PRIMARY_GOAL),cda)
cda: ## Composer dump-autoload
composer dump-autoload -o
endif
ifeq ($(PRIMARY_GOAL),crc)
crc: ## Composer require checker
php vendor/bin/composer-require-checker
endif
ifeq ($(PRIMARY_GOAL),rdr)
rdr: ## Rector Dry Run (see changes)
php vendor/bin/rector process --dry-run
endif
ifeq ($(PRIMARY_GOAL),rmc)
rmc: ## Rector (make changes)
php vendor/bin/rector
endif
#
# Help
#
ifeq ($(PRIMARY_GOAL),help)
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
endif
.PHONY: menu p pf pc pu ric riu i co cwn cu cda crc rdr rmc help