forked from facebookarchive/Facebook-Pixel-for-Drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
93 lines (85 loc) · 3.86 KB
/
build.xml
File metadata and controls
93 lines (85 loc) · 3.86 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-model xlink:href="/usr/share/php5/PEAR/data/phing/etc/phing-grammar.rng"
type="application/xml"
schematypens="http://relaxng.org/ns/structure/1.0" ?>
<project name="pixel-plugins" basedir="." default="main">
<property file="./build.properties" />
<!-- Fileset for all files -->
<fileset dir="${basedir}" id="sourcedir">
<exclude name=".gitignore" />
<exclude name="build.properties" />
<exclude name="build.xml" />
<exclude name="vendor/**" />
<exclude name="tests/**" />
<exclude name="composer.json" />
<exclude name="composer.lock" />
</fileset>
<!-- ============================================ -->
<!-- Target: Clean -->
<!-- ============================================ -->
<target name="Clean" description="Clean the environment">
<echo msg="Running Prepare..." />
<echo msg="Cleaning build folder..." />
<delete dir="${builddir}" />
<echo msg="Build folder deleted" />
<echo msg="Prepare complete" />
</target>
<!-- ============================================ -->
<!-- Target: Build -->
<!-- ============================================ -->
<target name="Build" description="rebuilds this package" depends="Clean">
<echo msg="Running Build..." />
<echo msg="Copy files into build folder..." />
<copy todir="${buildsourcedir}">
<fileset refid="sourcedir" />
</copy>
<copy todir="${buildsourcesrcdir}" >
<fileset dir="${commondir}" />
</copy>
<echo msg="Copy complete" />
<echo msg="Build complete" />
</target>
<!-- ============================================ -->
<!-- Target: Test -->
<!-- ============================================ -->
<target name="Test" description="Run tests" depends="Clean">
<echo msg="Running Test..." />
<phpunit bootstrap="${basedir}/vendor/autoload.php" haltonfailure="true" printsummary="true">
<batchtest>
<fileset dir="${testdir}">
<include name="*Test.php" />
</fileset>
</batchtest>
</phpunit>
<echo msg="Test complete" />
</target>
<!-- ============================================ -->
<!-- Target: Package -->
<!-- ============================================ -->
<target name="Package" description="Create package" depends="Build">
<echo msg="Running Package..." />
<!--TODO: add version-->
<zip destfile="${builddir}/${packagename}">
<fileset dir="${builddir}/" defaultexcludes="true">
<include name="**" />
</fileset>
</zip>
<echo msg="Package complete" />
</target>
<!-- ============================================ -->
<!-- Target: Help -->
<!-- ============================================ -->
<target name="Help" description="Usage help">
<echo msg="Available Targets: " />
<echo msg="Clean : Clean the environment." />
<echo msg="Build : Build the project." />
<echo msg="Test : Run all tests." />
<echo msg="Package: Create plugin package (zip)." />
<echo msg="If you run phing without providing any target, following targets will run in order: Clean, Test, Build, Package." />
</target>
<!-- ============================================ -->
<!-- (DEFAULT) Target: main -->
<!-- ============================================ -->
<target name="main" description="Prepare, Build, Test, Package" depends="Clean, Test, Build, Package">
</target>
</project>