-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·55 lines (41 loc) · 1.31 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
# customization
PACKAGE_NAME = icybee/module-seo
PACKAGE_VERSION = 3.0
PHPUNIT_VERSION = phpunit-5.7.phar
PHPUNIT_FILENAME = build/$(PHPUNIT_VERSION)
PHPUNIT = php $(PHPUNIT_FILENAME)
# do not edit the following lines
all: $(PHPUNIT_FILENAME) vendor
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
autoload: vendor
@composer dump-autoload
$(PHPUNIT_FILENAME):
mkdir -p build
wget https://phar.phpunit.de/$(PHPUNIT_VERSION) -O $(PHPUNIT_FILENAME)
test: all
@$(PHPUNIT)
test-coverage: all
@mkdir -p build/coverage
@$(PHPUNIT) --coverage-html ../build/coverage
test-coveralls: all
@mkdir -p build/logs
COMPOSER_ROOT_VERSION=$(PACKAGE_VERSION) composer require satooshi/php-coveralls
@$(PHPUNIT) --coverage-clover ../build/logs/clover.xml
php vendor/bin/coveralls -v
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 update