|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | | -<project name="phpunit" default="setup" xmlns:if="ant:if" xmlns:unless="ant:unless"> |
3 | | - <target name="setup" depends="clean,install-dependencies"/> |
4 | | - <target name="validate" depends="php-syntax-check,validate-composer-json"/> |
| 2 | +<project name="phpunit" default="setup"> |
| 3 | + <target name="setup" depends="install-dependencies"/> |
5 | 4 |
|
6 | | - <target name="clean" unless="clean.done" description="Cleanup build artifacts"> |
| 5 | + <target name="clean" description="Cleanup build artifacts"> |
7 | 6 | <delete dir="${basedir}/build/artifacts"/> |
8 | 7 | <delete dir="${basedir}/build/tmp"/> |
9 | 8 | <delete dir="${basedir}/vendor"/> |
10 | | - |
11 | | - <property name="clean.done" value="true"/> |
12 | | - </target> |
13 | | - |
14 | | - <target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build"> |
15 | | - <mkdir dir="${basedir}/build/artifacts/logfiles"/> |
16 | | - <mkdir dir="${basedir}/build/tmp"/> |
17 | | - |
18 | | - <property name="prepare.done" value="true"/> |
19 | | - </target> |
20 | | - |
21 | | - <target name="validate-composer-json" depends="clean" unless="validate-composer-json.done" description="Validate composer.json"> |
22 | | - <exec executable="${basedir}/tools/composer" failonerror="true" taskname="composer"> |
23 | | - <arg value="validate"/> |
24 | | - <arg value="--strict"/> |
25 | | - <arg value="${basedir}/composer.json"/> |
26 | | - </exec> |
27 | | - |
28 | | - <property name="validate-composer-json.done" value="true"/> |
29 | 9 | </target> |
30 | 10 |
|
31 | 11 | <target name="-dependencies-installed"> |
32 | 12 | <available type="dir" file="${basedir}/vendor" property="dependencies-installed"/> |
33 | 13 | </target> |
34 | 14 |
|
35 | | - <target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed,validate-composer-json" description="Install dependencies with Composer"> |
| 15 | + <target name="install-dependencies" description="Install dependencies (and generate autoloader) with Composer"> |
36 | 16 | <exec executable="${basedir}/tools/composer" taskname="composer"> |
37 | 17 | <arg value="install"/> |
38 | 18 | <arg value="--no-interaction"/> |
|
41 | 21 | </exec> |
42 | 22 | </target> |
43 | 23 |
|
44 | | - <target name="check-dependencies" description="Performs check for outdated dependencies"> |
45 | | - <exec executable="${basedir}/tools/composer" taskname="composer"> |
46 | | - <arg value="show"/> |
47 | | - <arg value="--minor-only"/> |
48 | | - <arg value="--latest"/> |
49 | | - <arg value="--direct"/> |
50 | | - <arg value="--outdated"/> |
51 | | - <arg value="--strict"/> |
| 24 | + <target name="update-tools"> |
| 25 | + <exec executable="${basedir}/tools/phive"> |
| 26 | + <arg value="--no-progress"/> |
| 27 | + <arg value="self-update"/> |
52 | 28 | </exec> |
53 | | - </target> |
54 | 29 |
|
55 | | - <target name="php-syntax-check" unless="php-syntax-check.done" description="Perform syntax check on PHP files"> |
56 | | - <apply executable="php" failonerror="true" taskname="lint"> |
57 | | - <arg value="-l"/> |
58 | | - |
59 | | - <fileset dir="${basedir}/src"> |
60 | | - <include name="**/*.php"/> |
61 | | - <modified/> |
62 | | - </fileset> |
63 | | - |
64 | | - <fileset dir="${basedir}/tests"> |
65 | | - <include name="**/*.php"/> |
66 | | - <modified/> |
67 | | - </fileset> |
68 | | - </apply> |
69 | | - |
70 | | - <property name="php-syntax-check.done" value="true"/> |
| 30 | + <exec executable="${basedir}/tools/phive"> |
| 31 | + <arg value="--no-progress"/> |
| 32 | + <arg value="update"/> |
| 33 | + </exec> |
71 | 34 | </target> |
72 | 35 |
|
73 | | - <target name="test" depends="validate,install-dependencies" description="Run tests"> |
74 | | - <exec executable="${basedir}/phpunit" taskname="phpunit"/> |
| 36 | + <target name="generate-global-assert-wrappers" description="Generate global function wrappers for static methods in Assert and TestCase that are commonly used"> |
| 37 | + <exec executable="${basedir}/build/scripts/generate-global-assert-wrappers.php" taskname="generate-global-assert-wrappers" failonerror="true"/> |
| 38 | + <exec executable="${basedir}/tools/php-cs-fixer" taskname="php-cs-fixer" failonerror="true"> |
| 39 | + <arg value="fix"/> |
| 40 | + <arg path="${basedir}/src/Framework/Assert/Functions.php"/> |
| 41 | + </exec> |
75 | 42 | </target> |
76 | 43 |
|
77 | 44 | <target name="signed-phar" depends="phar" description="Create signed PHAR archive of PHPUnit and all its dependencies"> |
|
445 | 412 | <arg value="--coverage-text" /> |
446 | 413 | </exec> |
447 | 414 | </target> |
448 | | - |
449 | | - <target name="update-tools"> |
450 | | - <exec executable="${basedir}/tools/phive"> |
451 | | - <arg value="--no-progress"/> |
452 | | - <arg value="self-update"/> |
453 | | - </exec> |
454 | | - |
455 | | - <exec executable="${basedir}/tools/phive"> |
456 | | - <arg value="--no-progress"/> |
457 | | - <arg value="update"/> |
458 | | - </exec> |
459 | | - </target> |
460 | | - |
461 | | - <target name="generate-global-assert-wrappers" description="Generate global function wrappers for static methods in Assert and TestCase that are commonly used"> |
462 | | - <exec executable="${basedir}/build/scripts/generate-global-assert-wrappers.php" taskname="generate-global-assert-wrappers" failonerror="true"/> |
463 | | - <exec executable="${basedir}/tools/php-cs-fixer" taskname="php-cs-fixer" failonerror="true"> |
464 | | - <arg value="fix"/> |
465 | | - <arg path="${basedir}/src/Framework/Assert/Functions.php"/> |
466 | | - </exec> |
467 | | - </target> |
468 | 415 | </project> |
469 | | - |
0 commit comments