This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.xml
47 lines (38 loc) · 1.94 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="MageConfigSync" default="test">
<property name="bin.phar-composer" value="vendor/bin/phar-composer" />
<property name="bin.mage-ci" value="vendor/bin/mage-ci" />
<property name="bin.phpunit" value="vendor/bin/phpunit -c ${project.basedir}/phpunit.xml" />
<property name="dir.build" value="${project.basedir}/build/" />
<property name="magento.version" value="1.7.0.2" />
<property name="magento.base_dir" value="${project.basedir}/magento" />
<property name="magento.base_url" value="http://dev/null/" />
<property name="db.name" value="mageconfigtest" />
<property name="db.user" value="root" />
<property name="db.pass" value="toor" />
<target name="test" depends="test-unit,test-integration" />
<target name="test-unit" depends="install-deps">
<exec command="${bin.phpunit} --exclude-group integration" passthru="true" />
</target>
<target name="test-integration" depends="install-magento,install-deps">
<exec command="${bin.phpunit} --group integration" passthru="true" />
</target>
<target name="install-magento" depends="install-deps">
<if>
<not><available type="dir" file="${magento.base_dir}" /></not>
<then>
<exec command="${bin.mage-ci} install ${magento.base_dir} ${magento.version} ${db.name} -c -t -u ${db.user} -p ${db.pass} -b ${magento.base_url}" passthru="true" checkreturn="true" />
</then>
<else>
<echo message="Magento is already installed in ${magento.base_dir}. Skipping.." />
</else>
</if>
</target>
<target name="build" depends="install-deps">
<mkdir dir="${dir.build}" />
<exec command="${bin.phar-composer} build ${project.basedir} ${dir.build}" passthru="true" />
</target>
<target name="install-deps">
<exec command="composer install" />
</target>
</project>