File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
.PHONY : test phpcs test-report test-fix update-compatibility-patch
2
2
3
- PHP_74_OR_NEWER = ` php -r " echo (int) version_compare(PHP_VERSION, '7.4', '>=');" `
3
+ PHP_74_OR_NEWER: = $( shell php -r "echo (int) version_compare(PHP_VERSION, '7.4', '>=');")
4
4
5
5
test : test-report test-fix
6
6
11
11
12
12
test-report : vendor
13
13
@if [ $( PHP_74_OR_NEWER) -eq 1 ]; then git apply tests/php-compatibility.patch; fi
14
- @vendor/bin/phpcs ` find tests/input/* | sort` --report=summary --report-file=phpcs.log; diff tests/expected_report.txt phpcs.log; if [ $$ ? -ne 0 ] && [ $( PHP_74_OR_NEWER) -eq 1 ]; then git apply -R tests/php-compatibility.patch; exit 1; fi
14
+ @vendor/bin/phpcs ` find tests/input/* | sort` --report=summary --report-file=phpcs.log; diff -u tests/expected_report.txt phpcs.log; if [ $$ ? -ne 0 ]; then if [ $( PHP_74_OR_NEWER) -eq 1 ]; then git apply -R tests/php-compatibility.patch; fi ; exit 1; fi
15
15
@if [ $( PHP_74_OR_NEWER) -eq 1 ]; then git apply -R tests/php-compatibility.patch; fi
16
16
17
17
test-fix : vendor
@@ -22,10 +22,11 @@ test-fix: vendor
22
22
23
23
update-compatibility-patch :
24
24
@git apply tests/php-compatibility.patch
25
- @echo -e " Please open your editor and apply your changes\n"
25
+ @printf " Please open your editor and apply your changes\n"
26
26
@until [ " $$ {compatibility_resolved}" == " y" ]; do read -p " Have finished your changes (y|n)? " compatibility_resolved; done && compatibility_resolved=
27
27
@git diff -- tests/expected_report.txt tests/fixed > .tmp-patch && mv .tmp-patch tests/php-compatibility.patch && git apply -R tests/php-compatibility.patch
28
28
@git commit -m ' Update compatibility patch' tests/php-compatibility.patch
29
29
30
30
vendor : composer.json
31
31
composer update
32
+ touch -c vendor
You can’t perform that action at this time.
0 commit comments