-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.04 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
# customization
PACKAGE_NAME = icanboogie/message-bus
PACKAGE_VERSION = 0.8
PHPCS_FILENAME = build/phpcs
# do not edit the following lines
usage:
@echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files."
vendor:
@COMPOSER_ROOT_VERSION=$(PACKAGE_VERSION) composer install
update:
@COMPOSER_ROOT_VERSION=$(PACKAGE_VERSION) composer update
test: vendor
@$(PHPUNIT)
test-coverage: vendor
@mkdir -p build/coverage
@$(PHPUNIT) --coverage-html build/coverage
$(PHPCS_FILENAME):
curl -L -o $@ https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
chmod +x $@
lint: vendor $(PHPCS_FILENAME)
$(PHPCS_FILENAME)
vendor/bin/phpstan analyse
doc: vendor
@mkdir -p build/docs
@apigen generate \
--source lib \
--destination build/docs/ \
--title "$(PACKAGE_NAME) v$(PACKAGE_VERSION)" \
--template-theme "bootstrap"
clean:
@rm -fR build
@rm -fR vendor
@rm -f composer.lock
.PHONY: all autoload doc clean test test-coverage test-coveralls test-dependencies update