-
Notifications
You must be signed in to change notification settings - Fork 55
/
Makefile
68 lines (52 loc) · 1.89 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
## help - Display help about make targets for this Makefile
help:
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t
## clean - Cleans the project
clean:
rm -rf vendor clover.xml clover.html bin .phpunit.cache
## codesniffer - Run linting on the PHP files
codesniffer:
composer lint
## codesniffer-fix- Fix lint errors on PHP files
codesniffer-fix:
composer fix
## coverage - Runs the test suite and generates a coverage report
coverage:
composer coverage
## docs - Generate documentation for the library
docs:
curl -LJs https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.3.1/phpDocumentor.phar -o phpDocumentor.phar
php phpDocumentor.phar -d lib -t docs
## init-examples-submodule - Initialize the examples submodule
init-examples-submodule:
git submodule init
git submodule update
## install - Install dependencies
install: | init-examples-submodule
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
## lint - Lint the project
lint: codesniffer phpstan scan
## lint-fix - Fix linting errors
lint-fix: codesniffer-fix
## phpstan - Scan for static analysis errors
phpstan:
composer phpstan
## release - Cuts a release for the project on GitHub (requires GitHub CLI)
# tag = The associated tag title of the release
# target = Target branch or full commit SHA
release:
gh release create ${tag} --target ${target}
## scan - Runs security analysis on the project
scan:
composer scan
## test - Test the project
test:
composer test
## update - Update dependencies
update: | update-examples-submodule
composer update
## update-examples-submodule - Update the examples submodule
update-examples-submodule:
git submodule init
git submodule update --remote
.PHONY: help clean codesniffer codesniffer-fix coverage docs install lint lint-fix release scan test update update-examples-submodule