This repository has been archived by the owner on Feb 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml.sample
43 lines (40 loc) · 1.85 KB
/
build.xml.sample
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="sample-project" basedir="." default="test">
<property name="builddir" location="${basedir}/build" />
<include file="${basedir}/ant-phptools/tests.xml" as="phptools"/>
<include file="${basedir}/ant-phptools/composer.xml" as="composer"/>
<target name="init">
<echo message="Project: ${ant.project.name}" />
<echo message="Environment: ${build.env}"/>
<echo message="Hudson build ID: ${env.BUILD_ID}"/>
<echo message="Hudson build number: ${env.BUILD_NUMBER}"/>
<echo message="git revision: ${env.GIT_REVISION}"/>
<tstamp>
<format property="build.datetime" pattern="dd-MMM-yy HH:mm:ss"/>
</tstamp>
<echo message="Build started at ${build.datetime}"/>
</target>
<!-- Clean up previous build artifacts -->
<target name="clean" description="Cleanup previous build artifacts">
<echo message="Cleaning up ${builddir}" level="verbose"/>
<delete dir="${builddir}/api"/>
<delete dir="${builddir}/code-browser"/>
<delete dir="${builddir}/coverage"/>
<delete dir="${builddir}/logs"/>
<delete dir="${builddir}/pdepend"/>
<delete dir="${builddir}/phpdox"/>
<delete dir="${builddir}/reports"/>
</target>
<!-- Set up directories used for build -->
<target name="prepare" depends="clean" description="Prepare for build">
<echo message="Preparing ${builddir}" level="verbose" />
<mkdir dir="${builddir}/api"/>
<mkdir dir="${builddir}/code-browser"/>
<mkdir dir="${builddir}/coverage"/>
<mkdir dir="${builddir}/logs"/>
<mkdir dir="${builddir}/pdepend"/>
<mkdir dir="${builddir}/phpdox"/>
<mkdir dir="${builddir}/reports"/>
</target>
<target name="test" depends="prepare, phptools.phptests" />
</project>