|
7 | 7 | <target name="qa" description="Check code quality"
|
8 | 8 | depends="composer:normalize,composer:validate,phpstan:analyse"/>
|
9 | 9 |
|
10 |
| - <target name="visualizer" description="Create buildfile diagram"> |
11 |
| - <uptodate property="visualizer.uptodate" srcfile="build.xml" targetfile="build.png"/> |
12 |
| - <if> |
13 |
| - <not> |
14 |
| - <isset property="visualizer.uptodate"/> |
15 |
| - </not> |
16 |
| - <then> |
17 |
| - <visualizer format="puml" showTitle="true" showDescription="true" |
18 |
| - footer="Visit https://www.phing.info/"/> |
19 |
| - <visualizer format="png" showTitle="true" showDescription="true" |
20 |
| - footer="Visit https://www.phing.info/"/> |
21 |
| - </then> |
22 |
| - </if> |
| 10 | + <target name="help" description="Create buildfile diagram"> |
| 11 | + <uptodate property="uptodate.build.xml" srcfile="build.xml" targetfile="build.png"/> |
| 12 | + <runtarget target="visualizer"/> |
| 13 | + <open path="build.png"/> |
23 | 14 | </target>
|
24 | 15 |
|
25 |
| - <target name="help" depends="visualizer"> |
26 |
| - <exec executable="xdg-open" spawn="true"> |
27 |
| - <arg path="build.png"/> |
28 |
| - </exec> |
| 16 | + <target name="visualizer" unless="uptodate.build.xml"> |
| 17 | + <visualizer format="puml" showTitle="true" showDescription="true" |
| 18 | + footer="Visit https://www.phing.info/"/> |
| 19 | + <visualizer format="png" showTitle="true" showDescription="true" |
| 20 | + footer="Visit https://www.phing.info/"/> |
29 | 21 | </target>
|
30 | 22 |
|
31 | 23 | <target name="composer:normalize" description="Normalize composer.json content">
|
|
59 | 51 | <!-- I use this Target to have a documentation preview -->
|
60 | 52 | <exec executable="xsltproc" passthru="true" checkreturn="true">
|
61 | 53 | <arg value="--output"/>
|
62 |
| - <arg value="docs/guide.html"/> |
| 54 | + <arg value="guide/VisualizerTask.html"/> |
63 | 55 | <arg value="--xinclude"/>
|
64 | 56 | <arg file="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl"/>
|
65 |
| - <arg file="docs/guide.xml"/> |
66 |
| - </exec> |
67 |
| - <exec executable="xdg-open" spawn="true"> |
68 |
| - <arg value="docs/guide.html"/> |
| 57 | + <arg file="guide/VisualizerTask.xml"/> |
69 | 58 | </exec>
|
| 59 | + <open path="guide/VisualizerTask.html"/> |
70 | 60 | </target>
|
71 | 61 |
|
72 | 62 | </project>
|
0 commit comments