-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
156 lines (106 loc) · 1.93 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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/usr/bin/make -f
#
#
#
# Update codebase
#
.PHONY: codebase-update
codebase-update:
git pull
composer update
# Build and development environment using make
#
COMPOSER_PACKAGES = \
"phpunit/phpunit=4.*" \
"sebastian/phpcpd=2.*" \
"phploc/phploc=2.*" \
"phpdocumentor/phpdocumentor=2.*" \
"squizlabs/php_codesniffer=2.*" \
"phpmd/phpmd=@stable" \
NPM_PACKAGES = \
htmlhint \
csslint \
less \
APM_PACKAGES = \
linter \
linter-htmlhint \
linter-csslint \
linter-less \
linter-jscs \
linter-jshint \
linter-pep8 \
linter-pylint \
linter-php \
linter-phpcs \
linter-phpmd \
linter-shellcheck \
linter-xmllint \
block-travel \
#
# Various test to pass build
#
.PHONY: test
test: phpunit phpcs
#
# less
#
.PHONY: less
less:
lessc --clean-css app/css/style.less htdocs/css/style.css
#
# phpcs
#
.PHONY: phpcs
phpcs:
phpcs --standard=.phpcs.xml
#
# phpcbf
#
.PHONY: phpcbf
phpcbf:
phpcbf --standard=.phpcs.xml
#
# phpunit
#
.PHONY: phpunit
phpunit:
phpunit --configuration .phpunit.xml
#
# phpdoc
#
.PHONY: phpdoc
phpdoc:
phpdoc --config=.phpdoc.xml
#
# All developer tools
#
.PHONY: tools-config tools-install tools-update
tools-config: npm-config
tools-install: composer-require npm-install apm-install
tools-update: composer-update npm-update apm-update
#
# composer
#
.PHONY: composer-require composer-update
composer-require:
composer --sort-packages --update-no-dev global require $(COMPOSER_PACKAGES)
composer-update:
composer --no-dev global update
#
# npm
#
.PHONY: npm-config npm-installl npm-update
npm-config:
npm config set prefix '~/.npm-packages'
npm-install:
npm -g install $(NPM_PACKAGES)
npm-update:
npm -g update
#
# apm
#
.PHONY: apm-installl apm-update
apm-install:
apm install $(APM_PACKAGES)
apm-update:
apm update --confirm=false