aboutsummaryrefslogblamecommitdiffstats
path: root/vendor/sabre/dav/build.xml
blob: 0f70f81997b3ec291af009bf10dd72aebf29c4f9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                                                                                         























































                                                                                                                          
<?xml version="1.0"?>
<project name="SabreDAV" default="buildzip" basedir=".">

    <!-- Any default properties -->
    <property file="build.properties" />

    <!-- Where to write api documentation -->
    <property name="sabredav.apidocspath" value="docs/api" />

    <target name="buildzip" depends="init, test, clean">
        <mkdir dir="build" />
        <echo>Running composer</echo>
        <exec command="composer create-project --no-dev sabre/dav build/SabreDAV ${sabredav.version}" checkreturn="false" passthru="1" />
        <zip destfile="build/SabreDAV-${sabredav.version}.zip" basedir="build/SabreDAV" prefix="SabreDAV/" />
    </target>

    <target name="clean" depends="init">
        <echo msg="Removing build files (cleaning up distribution)" />
        <delete dir="docs/api" />
        <delete dir="build" />
    </target>

    <target name="markrelease" depends="init,clean,test">
        <echo>Creating Git release tag</echo>
        <exec command="git tag ${sabredav.version}" checkreturn="false" passthru="1" />
    </target>

    <target name="test">
        <phpunit haltonfailure="1" haltonerror="1" bootstrap="tests/bootstrap.php" haltonskipped="1" printsummary="1">
          <batchtest>
            <fileset dir="tests">
              <include name="**/*.php"/>
            </fileset>
          </batchtest>
        </phpunit>
    </target>

    <target name="apidocs" depends="init">

        <echo>Creating api documentation using PHP documentor</echo>
        <echo>Writing to ${sabredav.apidocspath}</echo>
        <exec command="phpdoc parse -t ${sabredav.apidocspath} -d lib/" passthru="1" />
        <exec command="bin/phpdocmd ${sabredav.apidocspath}/structure.xml ${sabredav.apidocspath} --lt %c" passthru="1" />
        <!--<delete file="${sabredav.apidocspath}/structure.xml" />-->

    </target>

    <target name="init">

        <!-- This sets SabreDAV version information -->
        <adhoc-task name="sabredav-version"><![CDATA[

            class SabreDAV_VersionTask extends Task {

                public function main() {

                    include_once 'lib/Sabre/DAV/Version.php';
                    $this->getProject()->setNewProperty('sabredav.version',\Sabre\DAV\Version::VERSION);
                    $this->getProject()->setNewProperty('sabredav.stability',\Sabre\DAV\Version::STABILITY);
                    $this->getProject()->setNewProperty('sabredav.ucstability',ucwords(Sabre\DAV\Version::STABILITY));

                }

            }

        ]]></adhoc-task>
        <sabredav-version />
        <echo>SabreDAV version ${sabredav.version}</echo>

    </target>

</project>