forked from llbit/chunky-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
67 lines (63 loc) · 1.96 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
67
<project name="chunky-docs" default="build">
<!-- global project properties -->
<property name="docs.dir" location="${basedir}/docs"/>
<property name="build.dir" location="${basedir}/out"/>
<property name="tmp.dir" location="${basedir}/tmp"/>
<property name="tools.dir" location="${basedir}/tools"/>
<property file="${basedir}/version.properties"/>
<target name="build">
<mkdir dir="${tmp.dir}"/>
<echo message="Copying source files"/>
<copy todir="${tmp.dir}">
<fileset dir="${docs.dir}"/>
<filterset>
<filter token="VERSION" value="${version}"/>
<filter token="EXE_DL_LINK" value="${exe.dl.link}"/>
<filter token="ZIP_DL_LINK" value="${zip.dl.link}"/>
<filter token="BUILD_DATE" value="${build.date}"/>
</filterset>
</copy>
<echo message="Creating output directories"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/gallery"/>
<echo message="Copying stylesheet"/>
<copy todir="${build.dir}">
<fileset dir="${basedir}/style"/>
</copy>
<copy todir="${build.dir}">
<fileset dir="${docs.dir}">
<type type="dir"/>
</fileset>
</copy>
<echo message="Running Markdown Wrapper"/>
<!-- create menu template -->
<exec executable="python">
<arg value="${tools.dir}/mdwrapper.py"/>
<arg value="prepare"/>
</exec>
<globmapper id="mymapper"
from="*.md"
to="${build.dir}${file.separator}*.html"/>
<apply executable="python" dest="${build.dir}">
<arg value="${tools.dir}/mdwrapper.py"/>
<srcfile/>
<fileset dir="${tmp.dir}" includes="**/*.md"/>
<mapper refid="mymapper"/>
<redirector>
<outputmapper refid="mymapper"/>
</redirector>
</apply>
<echo message="Creating thumbnails"/>
<exec executable="python">
<arg value="${tools.dir}/makethumbs.py"/>
</exec>
<echo message="Copying images"/>
<copy todir="${build.dir}">
<fileset dir="${basedir}/images"/>
</copy>
</target>
<target name="clean">
<delete dir="${tmp.dir}"/>
<delete dir="${build.dir}"/>
</target>
</project>