~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to api/scripts/build.xml

Updated server-side Ant script to check in both /usr/local/bin and /usr/bin for required tools.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
        Helioviewer Back-end Apache Ant build.xml
6
6
    </description>
7
7
        
8
 
        <!-- Prerequisites -->
9
 
        <available file="/usr/local/bin/phpcs" type="file" property="phpcs.found" />
10
 
        <available file="/usr/local/bin/phpdoc" type="file" property="phpdoc.found" />
11
 
        <available file="/usr/local/bin/phpunit" type="file" property="phpunit.found" />
12
 
        
13
8
        <!-- TODO: target = all -->
14
9
        
15
 
    <!-- Check for PHPUnit -->  
 
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
 
16
18
    <target name="phpunit_prereqs" unless="phpunit.found">
17
19
       <echo>Unable to find PHPUnit.</echo>
18
20
       <echo>To install, follow instructions at:</echo>
19
21
       <echo>   http://www.phpunit.de/manual/3.4/en/installation.html</echo>
20
22
    </target>
21
23
    
22
 
    <!-- PHPUnit -->
23
24
    <target name="test" depends="phpunit_prereqs" if="phpunit.found">
24
25
        <description>
25
26
            Runs PHPUnit tests.
30
31
        </exec>
31
32
    </target>
32
33
        
33
 
        <!-- Check for PHP Codesniffer -->      
 
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
    
34
42
        <target name="phpcs_prereqs" unless="phpcs.found">
35
43
           <echo>Unable to find PHP CodeSniffer.</echo>
36
44
           <echo>To install, run:</echo>
37
45
           <echo>   sudo pear install PHP_CodeSniffer</echo>
38
46
        </target>
39
 
        
40
 
    <!-- PHP CodeSniffer -->
 
47
 
41
48
        <target name="phpcs" depends="phpcs_prereqs" if="phpcs.found">
42
49
                <description>
43
50
            Checks code against a specified coding standard.
48
55
                </exec>
49
56
        </target>
50
57
        
51
 
        <!-- Check for phpDocumentor -->
52
 
    <target name="phpdoc_prereqs" unless="phpdoc.found">
53
 
       <echo>Unable to find phpDocumentor</echo>
54
 
       <echo>To install, run:</echo>
55
 
       <echo>   sudo pear install --alldeps PhpDocumentor</echo>
56
 
    </target>
 
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>
57
65
    
58
 
    <!-- PHP Documentation Generation -->
59
66
    <target name="phpdoc" depends="phpdoc_prereqs" if="phpdoc.found">
60
67
        <description>
61
68
            Generates PHP Documentation using phpDocumentor.
65
72
            <arg line="-t docs/ -d lib/" />
66
73
        </exec>
67
74
    </target>
68
 
</project>
 
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'