This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
91 lines (75 loc) · 3.19 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
#
# JBZoo TeamCity
#
# This file is part of the JBZoo CCK package.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package TeamCity
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/TeamCity
#
.PHONY: build update test-all validate autoload test phpmd phpcs phpcpd phploc reset coveralls
build: update
test-all:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Run all tests \033[0m"
@make validate test phpmd phpcs phpcpd phploc
test-bin:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Run all tests \033[0m"
@php ./vendor/jbzoo/console/bin/jbzoo teamcity:clover ./tests/fixtures/clover.xml
@php ./vendor/jbzoo/console/bin/jbzoo teamcity:pdepend ./tests/fixtures/pdepend.xml
@php ./vendor/jbzoo/console/bin/jbzoo teamcity:phploc ./tests/fixtures/phploc.xml
@php ./vendor/jbzoo/console/bin/jbzoo teamcity:phpmetrics ./tests/fixtures/phpmetrics.xml
@echo ""
update:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Update project \033[0m"
@composer update --optimize-autoloader --no-interaction
@echo ""
validate:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Composer validate \033[0m"
@composer validate --no-interaction
@echo ""
autoload:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Composer autoload \033[0m"
@composer dump-autoload --optimize --no-interaction
@echo ""
test:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Run unit-tests \033[0m"
@php ./vendor/phpunit/phpunit/phpunit --configuration ./phpunit.xml.dist
@make test-bin
@echo ""
test-x:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Run unit-tests with XDebug \033[0m"
@php-x ./vendor/phpunit/phpunit/phpunit --configuration ./phpunit.xml.dist --verbose
@echo ""
phpmd:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Check PHPmd \033[0m"
@php ./vendor/phpmd/phpmd/src/bin/phpmd ./src text \
./vendor/jbzoo/misc/phpmd/jbzoo.xml --verbose
phpcs:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Check Code Style \033[0m"
@php ./vendor/squizlabs/php_codesniffer/scripts/phpcs ./src \
--extensions=php \
--standard=./vendor/jbzoo/misc/phpcs/JBZoo/ruleset.xml \
--report=full
@echo ""
phpcpd:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Check Copy&Paste \033[0m"
@php ./vendor/sebastian/phpcpd/phpcpd ./src --verbose
@echo ""
phploc:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Show stats \033[0m"
@php ./vendor/phploc/phploc/phploc ./src --verbose
@echo ""
reset:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Hard reset \033[0m"
@git reset --hard
clean:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Cleanup project \033[0m"
@rm -rf ./vendor/
@rm -f ./composer.lock
coveralls:
@echo -e "\033[0;33m>>> >>> >>> >>> >>> >>> >>> >>> \033[0;30;46m Send coverage to coveralls.io \033[0m"
@php ./vendor/satooshi/php-coveralls/bin/coveralls --verbose
@echo ""