-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 1.46 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
# customization
PACKAGE_NAME = olvlvl/doctrine-generators
PACKAGE_VERSION = 0.1
PHPUNIT_VERSION = phpunit-7.phar
PHPUNIT = build/$(PHPUNIT_VERSION)
PHPUNIT_COVERAGE=phpdbg -qrr $(PHPUNIT) -d memory_limit=-1
# do not edit the following lines
all: $(PHPUNIT) 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):
mkdir -p build
wget https://phar.phpunit.de/$(PHPUNIT_VERSION) -O $(PHPUNIT)
chmod +x $(PHPUNIT)
test: all
@$(PHPUNIT)
test-container:
@docker-compose \
-f ./tests/docker-compose.yml \
-p doctrine-generators-test \
run --rm app sh
test-coverage: all
@mkdir -p build/coverage
@$(PHPUNIT_COVERAGE) --coverage-html build/coverage
test-coveralls: all
@mkdir -p build/logs
COMPOSER_ROOT_VERSION=$(PACKAGE_VERSION) composer require satooshi/php-coveralls
@$(PHPUNIT_COVERAGE) --coverage-clover build/logs/clover.xml
php vendor/bin/php-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