-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
93 lines (80 loc) · 2.65 KB
/
Makefile
File metadata and controls
93 lines (80 loc) · 2.65 KB
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
92
93
##
# This file is part of the ChillDev FileManager bundle.
#
# @author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
# @copyright 2012 - 2014 © by Rafał Wrzeszcz - Wrzasq.pl.
# @version 0.1.4
# @since 0.0.1
# @package ChillDev\Bundle\FileManagerBundle
##
# environment-vary commands
PHP = $(shell which php)
COMPOSER = $(shell which composer.phar)
PHPDOC = $(shell which phpdoc)
PHPCPD = ./vendor/bin/phpcpd
PHPCS = ./vendor/bin/phpcs
PHPUNIT = ./vendor/bin/phpunit
PHPMD = ./vendor/bin/phpmd
COVERALLS = ./vendor/bin/coveralls
# meta-targets
default: all
all: ci documentation
ci: check lint analyze tests
# project initialization
init:
git submodule update --init --recursive
$(COMPOSER) install --optimize-autoloader
# update composer dependencies
update:
$(COMPOSER) update --optimize-autoloader --no-dev
# syntax checking
check:
find . -path "./vendor" -prune -o -name "*.php" -exec $(PHP) -l {} \;
# conde linting
lint:
$(PHPCS) --standard=PSR2 --encoding=utf-8 --extensions=php --ignore=Tests --ignore=vendor --ignore=Resources .
$(PHPCPD) --exclude Tests --exclude vendor --exclude Resources .
# static code analyze
analyze:
$(PHPMD) . text rules.xml --exclude Tests,vendor,Resources
# tests running
tests:
$(PHPUNIT)
# publishing coverage statistics
coveralls:
$(COVERALLS) -v
# documentation generation
documentation:
$(PHPDOC) -t Resources/doc/gh-pages -d . -i "Tests/*" -i "vendor/*" -i "Resources/*" --title "ChillDev FileManager Bundle - by Chillout Development" --sourcecode --parseprivate
# this is temporary, until phpDocumentor2 will provide some convenient way for generating text pages and templates customization
find Resources/doc/gh-pages -name "*.html" -exec sed "s|<body>|<body>\\n<div id=\"ribbon\"><a href=\"https://github.com/chilloutdevelopment/ChillDevFileManagerBundle\" rel=\"me\">Fork me on GitHub</a></div>|g" {} -i \;
echo "\
/* after http://unindented.org/articles/2009/10/github-ribbon-using-css-transforms/ */\
#ribbon {\
background-color: #a00;\
overflow: hidden;\
/* top left corner */\
position: absolute;\
left: -3em;\
top: 2.5em;\
z-index: 2000;\
/* 45 deg ccw rotation */\
-moz-transform: rotate(-45deg);\
-webkit-transform: rotate(-45deg);\
/* shadow */\
-moz-box-shadow: 0 0 1em #888;\
-webkit-box-shadow: 0 0 1em #888;\
}\
\
#ribbon a {\
border: 1px solid #faa;\
color: #fff;\
display: block;\
font: bold 81.25% 'Helvetiva Neue', Helvetica, Arial, sans-serif;\
margin: 0.05em 0 0.075em 0;\
padding: 0.5em 3.5em;\
text-align: center;\
text-decoration: none;\
/* shadow */\
text-shadow: 0 0 0.5em #444;\
}" >> Resources/doc/gh-pages/css/template.css