forked from line/line-bot-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (62 loc) · 2.78 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
COMPOSER_BIN = ./vendor/bin
.PHONY: default test doc phpcs phpmd check install-devtool copyright release
default: check
test:
$(COMPOSER_BIN)/phpunit ./tests
doc:
yes yes | $(COMPOSER_BIN)/apigen generate --source=./src --destination=./docs --title line-bot-sdk-php
phpcs:
$(COMPOSER_BIN)/phpcs --standard=PSR2 src/ tests/ examples/EchoBot/src examples/EchoBot/public examples/KitchenSink/src examples/KitchenSink/public
phpmd:
$(COMPOSER_BIN)/phpmd ./src text cleancode,codesize,controversial,design,unusedcode,naming | \
grep -v 'Avoid using static access to class' | \
grep -v 'Avoid variables with short names like' | \
grep -v 'Avoid excessively long variable names like' | \
grep -v 'The method register uses an else expression' | \
grep -v 'The method sendRequest uses an else expression' | \
cat
$(COMPOSER_BIN)/phpmd ./examples/EchoBot/src text cleancode,codesize,controversial,design,unusedcode,naming | \
grep -v 'Avoid using static access to class' | \
grep -v 'Avoid variables with short names like' | \
grep -v 'Avoid excessively long variable names like' | \
grep -v 'The method register uses an else expression' | \
grep -v 'The method sendRequest uses an else expression' | \
cat
$(COMPOSER_BIN)/phpmd ./examples/EchoBot/public text cleancode,codesize,controversial,design,unusedcode,naming | \
grep -v 'Avoid using static access to class' | \
grep -v 'Avoid variables with short names like' | \
grep -v 'Avoid excessively long variable names like' | \
grep -v 'The method register uses an else expression' | \
grep -v 'The method sendRequest uses an else expression' | \
cat
$(COMPOSER_BIN)/phpmd ./examples/KitchenSink/src text cleancode,codesize,controversial,design,unusedcode,naming | \
grep -v 'Avoid using static access to class' | \
grep -v 'Avoid variables with short names like' | \
grep -v 'Avoid excessively long variable names like' | \
grep -v 'The method register uses an else expression' | \
grep -v 'The method sendRequest uses an else expression' | \
cat
$(COMPOSER_BIN)/phpmd ./examples/KitchenSink/public text cleancode,codesize,controversial,design,unusedcode,naming | \
grep -v 'Avoid using static access to class' | \
grep -v 'Avoid variables with short names like' | \
grep -v 'Avoid excessively long variable names like' | \
grep -v 'The method register uses an else expression' | \
grep -v 'The method sendRequest uses an else expression' | \
cat
copyright:
bash ./devtool/check_copyright.sh
check: test copyright phpcs phpmd
install-devtool:
bash ./devtool/download_req_mirror.sh
release:
ifndef VERSION
@tput setaf 1
@echo '[ERROR] $$VERSION is missing; it must be specified'
@echo 'USAGE:'
@echo ' make release VERSION=1.2.3'
@tput sgr0
@exit 255
endif
make doc
git tag $(VERSION)
git push origin $(VERSION)