This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (43 loc) · 1.47 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
.PHONY: qa
qa: cs phpstan rector-dry tests yaml-lint changelog
.PHONY: build-intl
build-intl: vendor
composer update --no-dev --prefer-dist --optimize-autoloader --working-dir=Resources/Private/PHP
tools/box compile -c Resources/Private/PHP/box.json
# See: https://github.com/crossnox/m2r2
.PHONY: changelog
changelog:
python3 -m venv .Build/changelog
.Build/changelog/bin/pip install setuptools m2r2
.Build/changelog/bin/m2r2 CHANGELOG.md && \
echo ".. _changelog:" | cat - CHANGELOG.rst > /tmp/CHANGELOG.rst && \
mv /tmp/CHANGELOG.rst Documentation/Changelog/Index.rst && \
rm CHANGELOG.rst
.PHONY: coding-standards
cs: vendor
.Build/bin/ecs check --fix
.PHONY: phpstan
phpstan: vendor
.Build/bin/phpstan analyse
.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 --configuration=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}'