~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to api/scripts/build.xml

Preparing to merge in my branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<project name="Helioviewer" default="phpcs" basedir="../">
 
2
    <!-- Helioviewer Back-end Apache Ant build.xml. -->
 
3
    <!-- Last updated: February  06, 2010 By Keith -->
 
4
    <description>
 
5
        Helioviewer Back-end Apache Ant build.xml
 
6
    </description>
 
7
        
 
8
        <!-- TODO: target = all -->
 
9
        
 
10
    <!-- PHPUnit -->
 
11
    <condition property="phpunit.found">
 
12
       <or>
 
13
           <available file="/usr/local/bin/phpunit" type="file" />
 
14
           <available file="/usr/bin/phpunit" type="file" />
 
15
       </or>
 
16
    </condition>
 
17
 
 
18
    <target name="phpunit_prereqs" unless="phpunit.found">
 
19
       <echo>Unable to find PHPUnit.</echo>
 
20
       <echo>To install, follow instructions at:</echo>
 
21
       <echo>   http://www.phpunit.de/manual/3.4/en/installation.html</echo>
 
22
    </target>
 
23
    
 
24
    <target name="test" depends="phpunit_prereqs" if="phpunit.found">
 
25
        <description>
 
26
            Runs PHPUnit tests.
 
27
        </description>
 
28
        <echo>Running PHPUnit tests...</echo>
 
29
        <exec executable="phpunit" error="/dev/null">
 
30
            <arg line="tests/" />
 
31
        </exec>
 
32
    </target>
 
33
        
 
34
        <!-- PHP CodeSniffer -->
 
35
    <condition property="phpcs.found">
 
36
       <or>
 
37
           <available file="/usr/local/bin/phpcs" type="file" />
 
38
           <available file="/usr/bin/phpcs" type="file" />
 
39
       </or>
 
40
    </condition>
 
41
    
 
42
        <target name="phpcs_prereqs" unless="phpcs.found">
 
43
           <echo>Unable to find PHP CodeSniffer.</echo>
 
44
           <echo>To install, run:</echo>
 
45
           <echo>   sudo pear install PHP_CodeSniffer</echo>
 
46
        </target>
 
47
 
 
48
        <target name="phpcs" depends="phpcs_prereqs" if="phpcs.found">
 
49
                <description>
 
50
            Checks code against a specified coding standard.
 
51
        </description>
 
52
                <echo>Checking coding standards</echo>
 
53
                <exec executable="phpcs" error="/dev/null">
 
54
                        <arg line="-n --standard=pear --report-width=120 src/" />
 
55
                </exec>
 
56
        </target>
 
57
        
 
58
    <!-- PHP Documentor -->
 
59
    <condition property="phpdoc.found">
 
60
       <or>
 
61
           <available file="/usr/local/bin/phpdoc" type="file" />
 
62
           <available file="/usr/bin/phpdoc" type="file" />
 
63
       </or>
 
64
    </condition>
 
65
    
 
66
    <target name="phpdoc" depends="phpdoc_prereqs" if="phpdoc.found">
 
67
        <description>
 
68
            Generates PHP Documentation using phpDocumentor.
 
69
        </description>
 
70
        <echo>Running phpDocumentor...</echo>
 
71
        <exec executable="phpdoc">
 
72
            <arg line="-t docs/ -d src/" />
 
73
        </exec>
 
74
    </target>
 
75
    
 
76
    <target name="phpdoc_prereqs" unless="phpdoc.found">
 
77
       <echo>Unable to find phpDocumentor</echo>
 
78
       <echo>To install, run:</echo>
 
79
       <echo>   sudo pear install --alldeps PhpDocumentor</echo>
 
80
    </target>
 
81
    
 
82
</project>
 
 
b'\\ No newline at end of file'