-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
51 lines (40 loc) · 1.34 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
.PHONY: qa
qa: cs tests phpstan rector-dry yaml-lint
# See: https://github.com/crossnox/m2r2
.PHONY: changelog
changelog:
m2r2 CHANGELOG.md && \
echo ".. _changelog:" | cat - CHANGELOG.rst > /tmp/CHANGELOG.rst && \
mv /tmp/CHANGELOG.rst Documentation/Changelog/Index.rst && \
rm CHANGELOG.rst
.PHONY: code-coverage
code-coverage: vendor
XDEBUG_MODE=coverage .Build/bin/phpunit -c Tests/phpunit.xml.dist --log-junit .Build/logs/phpunit.xml --coverage-text --coverage-clover .Build/logs/clover.xml
.PHONY: cs
cs: vendor
.Build/bin/ecs check --fix
.PHONY: phpstan
phpstan: vendor
.Build/bin/phpstan
.PHONY: rector
rector: vendor
.Build/bin/rector
.PHONY: rector-dry
rector-dry: vendor
.Build/bin/rector --dry-run
.PHONY: tests
tests: vendor
.Build/bin/phpunit -c Tests/phpunit.xml.dist
vendor: composer.json composer.lock
composer validate
composer install
composer normalize
.PHONY: xlf-lint
xlf-lint:
xmllint --schema Resources/Private/Language/xliff-core-1.2-strict.xsd --noout Resources/Private/Language/*.xlf
.PHONY: yaml-lint
yaml-lint: vendor
find -regex '.*\.ya?ml' ! -path "./.Build/*" -exec .Build/bin/yaml-lint -v {} \;
.PHONY: zip
zip:
grep -Po "(?<='version' => ')([0-9]+\.[0-9]+\.[0-9]+)" ext_emconf.php | xargs -I {version} sh -c 'mkdir -p ../zip; git archive -v -o "../zip/$(shell basename $(CURDIR))_{version}.zip" v{version}'