File: build.xml

package info (click to toggle)
php-phar-io-manifest 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 588 kB
  • sloc: php: 2,036; xml: 233; makefile: 12
file content (63 lines) | stat: -rw-r--r-- 2,672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<project name="manifest" default="setup">
    <target name="setup" depends="clean,install-tools,install-dependencies"/>

    <target name="clean" unless="clean.done" description="Cleanup build artifacts">
        <delete dir="${basedir}/tools"/>
        <delete dir="${basedir}/vendor"/>
        <delete file="${basedir}/src/autoload.php"/>

        <property name="clean.done" value="true"/>
    </target>

    <target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
        <property name="prepare.done" value="true"/>
    </target>

    <target name="install-dependencies" description="Install dependencies with Composer">
        <exec executable="composer" taskname="composer">
            <env key="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
            <arg value="install"/>
            <arg value="--no-interaction"/>
            <arg value="--no-progress"/>
            <arg value="--no-ansi"/>
            <arg value="--no-suggest"/>
            <arg value="--optimize-autoloader"/>
        </exec>
    </target>

    <target name="getphive" description="Get phive on travis-ci">
        <exec executable="wget" taskname="wget">
            <arg value="https://phar.io/releases/phive.phar"/>
        </exec>
        <exec executable="wget" taskname="wget">
            <arg value="https://phar.io/releases/phive.phar.asc"/>
        </exec>
        <exec executable="gpg" taskname="gpg-get-key">
            <arg line="--keyserver hkps.pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79" />
        </exec>
        <exec executable="gpg" taskname="gpg-verify">
            <arg line="--verify phive.phar.asc phive.phar" />
        </exec>
        <chmod file="phive.phar" perm="+x" />
        <delete file="phive.phar.asc" />
    </target>

    <target name="install-tools" unless="tools-installed" depends="-tools-installed" description="Install tools with Phive">
        <exec executable="phive" taskname="phive">
            <arg value="install"/>
            <arg value="--trust-gpg-keys" />
            <!--        phpab,           phpunit,         phpstan,         psaml,           php-cs-fixer     -->
            <arg value="4AA394086372C20A,2A8299CE842DD38C,CF1A108D0E7AE720,8A03EA3B385DBAA1,E82B2FB314E9906E" />
        </exec>
    </target>

    <target name="test" depends="install-tools,install-dependencies" description="Run tests">
        <exec executable="${basedir}/tools/phpunit" taskname="phpunit"/>
    </target>

    <target name="-tools-installed">
        <available file="${basedir}/tools" property="tools-installed" type="dir"/>
    </target>
</project>