-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·58 lines (46 loc) · 2.2 KB
/
build.xml
File metadata and controls
executable file
·58 lines (46 loc) · 2.2 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="repos" basedir="." default="dist">
<property name="source.folder" value="repos-web/" description=""/>
<property name="target.folder" value="target/" description=""/>
<property name="tools.folder" value="build/" description=""/>
<property name="cache.smarty.file" value="${tools.folder}/cached-smarty.tar"/>
<available file="${cache.smarty.file}" property="cache.smarty.available"/>
<target name="build">
</target>
<target name="install.smarty" depends="install.smarty.cached"
description="Smarty is LGPL and can be redistributed">
<exec executable="php" dir="${source.folder}/lib/smarty/" failonerror="true">
<arg value="install.php"/>
</exec>
<antcall target="install.smarty.save"/>
</target>
<target name="install.smarty.save" unless="cache.smarty.available"
description="cache the installed smarty (right after installation - not with cached templates)">
<tar destfile="${cache.smarty.file}" basedir="${source.folder}/lib/smarty/"
includes="libs/**,cache/**"/>
</target>
<target name="install.smarty.cached" if="cache.smarty.available"
description="Avoid repeated downloads for subsequent builds">
<untar src="${cache.smarty.file}" dest="${source.folder}/lib/smarty/"/>
</target>
<!-- precompile html templates (this destroys the original templates so it really requires clean, preprocess, but if added them they will be executed twice in compile) -->
<target name="encode.templates" depends="install.smarty">
<!-- treat every html file in the project as a template -->
<apply executable="php" dir="${source.folder}/lib/smarty/" parallel="false" relative="true">
<arg value="precompile.php"/>
<srcfile/>
<fileset dir="${source.folder}">
<include name="open/**/*.html"/>
<include name="edit/**/*.html"/>
<include name="conf/**/*.html"/>
<include name="account/**/*.html"/>
<include name="admin/**/*.html"/>
</fileset>
</apply>
<!-- done, mark template cache in CACHE_DIR as complete -->
<touch file="${source.folder}/lib/smarty/cache/COMPLETE"/>
</target>
<target name="dist">
<echo>Target removed</echo>
</target>
</project>