-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.phing.xml
116 lines (106 loc) · 4.62 KB
/
build.phing.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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="UTF-8"?>
<project name="mapguide-rest" default="dist">
<property name="app.version" value="master" />
<!-- ============================================ -->
<!-- Target: prepare -->
<!-- ============================================ -->
<target name="prepare">
<mkdir dir="./build" />
<mkdir dir="./dist" />
</target>
<!-- ============================================ -->
<!-- Target: clean -->
<!-- ============================================ -->
<target name="clean">
<echo msg="Cleaning build directory..." />
<delete dir="./build" includeemptydirs="true" />
<delete dir="./dist" includeemptydirs="true" />
</target>
<!-- ============================================ -->
<!-- Target: docgen -->
<!-- ============================================ -->
<target name="docgen">
<!-- NOTE: Window-ism. Can't use '/' here. Ugh! -->
<exec command="vendor\bin\swagger .\app\routes -o .\doc\data" dir="." logoutput="true" checkReturn="true" level="debug" />
</target>
<!-- ============================================ -->
<!-- Target: unit_test -->
<!-- ============================================ -->
<target name="unit_test">
<!-- NOTE: Window-ism -->
<exec command="vendor\bin\phpunit test" dir="." logoutput="true" checkReturn="true" />
</target>
<!-- ============================================ -->
<!-- Target: integration_test -->
<!-- ============================================ -->
<target name="integration_test">
<!-- NOTE: Window-ism -->
<exec command="vendor\bin\phpunit --bootstrap test\cli_bootstrap.php integration_test" dir="." logoutput="true" checkReturn="true" />
</target>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<target name="build" depends="prepare, docgen">
<echo msg="Copying files to build directory..." />
<copy todir="./build/app" overwrite="true">
<fileset dir="./app">
<include name="**/*.*" />
<include name="*" />
</fileset>
</copy>
<copy todir="./build/assets" overwrite="true">
<fileset dir="./assets">
<include name="**/*.*" />
<include name="*" />
</fileset>
</copy>
<copy todir="./build/cache" overwrite="true">
<fileset dir="./cache">
<include name="readme.txt" />
</fileset>
</copy>
<copy todir="./build/conf" overwrite="true">
<fileset dir="./conf">
<include name="**/*.*" />
<include name="*" />
</fileset>
</copy>
<copy todir="./build/doc" overwrite="true">
<fileset dir="./doc">
<include name="**/*.*" />
<include name="*" />
</fileset>
</copy>
<copy todir="./build/sampleapps" overwrite="true">
<fileset dir="./sampleapps">
<include name="**/*.*" />
<include name="*" />
</fileset>
</copy>
<copy todir="./build/vendor" overwrite="true">
<fileset dir="./vendor">
<include name="**/*" />
<include name="**/*.*" />
<include name="*" />
</fileset>
</copy>
<copy file=".htaccess" tofile="./build/.htaccess" overwrite="true" />
<copy file="index.php" tofile="./build/index.php" overwrite="true" />
<copy file="LICENSE" tofile="./build/LICENSE" overwrite="true" />
<copy file="changelog.txt" tofile="./build/changelog.txt" overwrite="true" />
<copy file="README.md" tofile="./build/README.md" overwrite="true" />
<copy file="web.config.iis" tofile="./build/web.config" overwrite="true" />
</target>
<!-- ============================================ -->
<!-- (DEFAULT) Target: dist -->
<!-- ============================================ -->
<target name="dist" depends="build">
<echo msg="Creating dist archive..." />
<zip destfile="./dist/mapguide-rest-${app.version}.zip">
<fileset dir="./build">
<include name="**/*.*" />
<include name="*" />
</fileset>
</zip>
</target>
</project>