-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
42 lines (34 loc) · 1.82 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Seniorbook" default="build" basedir=".">
<property name="source" value="."/>
<property environment="env"/>
<target name="build" depends="createArchive"/>
<target name="createArchive" depends="getVersion, phpunit">
<property name="folderName" value="php-strace-${version}"/>
<property name="fileName" value="${folderName}.tar.gz"/>
<delete file="${source}/${fileName}"/>
<tar longfile="gnu" destfile="${fileName}" compression="gzip">
<zipfileset dir="${source}/src" prefix="${folderName}/src"/>
<zipfileset dir="${source}/vendor/zendframework" prefix="${folderName}/vendor/zendframework"/>
<zipfileset dir="${source}/vendor/composer" prefix="${folderName}/vendor/composer"/>
<zipfileset dir="${source}/vendor" includes="autoload.php" prefix="${folderName}/vendor"/>
<zipfileset dir="${source}" includes="php-strace.php" prefix="${folderName}"/>
<tarfileset dir="${source}" filemode="555" fullpath="${folderName}/php-strace">
<include name="php-strace"/>
</tarfileset>
<tarfileset dir="${source}" fullpath="${folderName}/README">
<include name="README.md"/>
</tarfileset>
<tarfileset dir="${source}" fullpath="${folderName}/LICENSE">
<include name="LICENSE"/>
</tarfileset>
</tar>
</target>
<target name="getVersion">
<exec executable="${source}/scripts/version" outputproperty="version" failonerror="true"/>
<echo message="Building version: ${version}"/>
</target>
<target name="phpunit" description="Run unit tests using PHPUnit">
<exec executable="${source}/scripts/phpunit" failonerror="true"/>
</target>
</project>