-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
92 lines (67 loc) · 2.75 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
92
# vim: set tabstop=8 softtabstop=8 noexpandtab:
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: static-code-analysis
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan
vendor/bin/phpstan analyse --configuration=phpstan-default.neon.dist --memory-limit=-1
.PHONY: static-code-analysis-baseline
static-code-analysis-baseline: ## Generates a baseline for static code analysis with phpstan/phpstan
vendor/bin/phpstan analyze --configuration=phpstan-default.neon.dist --generate-baseline=phpstan-default-baseline.neon --memory-limit=-1
.PHONY: tests
tests: vendor
vendor/bin/phpunit tests
.PHONY: vendor
vendor: composer.json composer.lock ## Installs composer dependencies
composer install
.PHONY: cs
cs: ## Normalizes composer.json with ergebnis/composer-normalize and fixes code style issues with friendsofphp/php-cs-fixer
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --diff --verbose
all:
fresh:
git pull origin master
PACKAGE=`cat debian/composer.json | grep '"name"' | head -n 1 | awk -F'"' '{print $4}'`; \
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`; \
dch -b -v "${VERSION}" --package ${PACKAGE} "$CHANGES"
composer install
#install:
# mkdir -p $(DESTDIR)$(libdir)
# cp -r src/Ease/ $(DESTDIR)$(libdir)
# cp -r debian/composer.json $(DESTDIR)$(libdir)
# mkdir -p $(DESTDIR)$(docdir)
# cp -r docs $(DESTDIR)$(docdir)
#build: doc
# echo build;
clean:
rm -rf vendor composer.lock
rm -rf debian/php-ease-html
rm -rf debian/php-ease-html-doc
rm -rf debian/*.log debian/tmp
rm -rf .phpunit.result.cache tests/*.xml
apigen:
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`; \
apigen generate --source src --destination docs --title "Ease PHP Framework html ${VERSION}" --charset UTF-8 --access-levels public --access-levels protected --php --tree
doc:
rm -f docs/* -r
phpdoc -d src --title "Vitex Software's Ease Html"
mkdir -p docs
mv .phpdoc/build/* docs
test: phpunit
composer:
composer update
phpunit: composer
vendor/bin/phpunit --bootstrap tests/Bootstrap.php --configuration phpunit.xml tests/src/
deb:
dch -i "`git log -1 --pretty=%B`"
debuild -i -us -uc -b
rpm:
rpmdev-bumpspec --comment="`git log -1 --pretty=%B`" --userstring="Vítězslav Dvořák <info@vitexsoftware.cz>" ease-html.spec
rpmbuild -ba ease-html.spec
release:
echo Release v$(nextversion)
dch -v $(nextversion) `git log -1 --pretty=%B | head -n 1`
debuild -i -us -uc -b
git commit -a -m "Release v$(nextversion)"
git tag -a $(nextversion) -m "version $(nextversion)"
openbuild:
.PHONY : install build