-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
66 lines (59 loc) · 2.67 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8" ?>
<project name="cafevariome" basedir="." default="main">
<property file="./build.properties" />
<property name="package" value="${phing.project.name}" override="true" />
<property name="builddir" value="./build/cafevariome" override="true" />
<property name="dependencydir" value="${builddir}/vendor" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" />
<!-- Fileset for all files -->
<fileset dir="." id="allfiles">
<include name="app/**" />
<include name="Install/**" />
<include name="resources/**" />
<include name="tests/**" />
<include name="writable/cache/index.html" />
<include name="writable/debugbar/" />
<include name="writable/logs/" />
<include name="writable/session/index.html" />
<include name="writable/uploads/index.html" />
<include name="writable/.htaccess" />
<include name=".htaccess" />
<include name="index.php" />
<include name="composer.json" />
<include name="phpunit.xml" />
<include name="phpunit.xml.dist" />
<include name="composer.json" />
</fileset>
<!-- ============================================ -->
<!-- Target: Get Dependencies -->
<!-- ============================================ -->
<target name="fetchdependencies" description="get dependencies using composer">
<composer command="install" composer="/opt/php8/bin/composer">
<arg value="-d"/>
<arg path="${srcdir}" />
</composer>
</target>
<!-- ============================================ -->
<!-- Target: Run tests using PHPUNIT -->
<!-- ============================================ -->
<target name="runtests" depends="fetchdependencies" description="run tests">
<phpunit configuration="phpunit.xml" pharlocation="vendor/bin/phpunit" printsummary="true">
</phpunit>
</target>
<!-- ============================================ -->
<!-- Target: Copy Files -->
<!-- ============================================ -->
<target name="copyfiles" depends="runtests" description="copy project source files">
<mkdir dir="${builddir}" />
<copy todir="${builddir}">
<fileset refid="allfiles" />
</copy>
</target>
<target name="main" depends="copyfiles" description="archive the build to a zip file">
<zip destfile="cafevariome.zip">
<fileset dir="${builddir}">
<include name="**/**" />
</fileset>
</zip>
</target>
</project>