-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·88 lines (80 loc) · 3.86 KB
/
build.xml
File metadata and controls
executable file
·88 lines (80 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
<?xml version="1.0" encoding="utf-8"?>
<project name="EdiromOnlineBackend" default="xar">
<import file="${basedir}/testing/ant-tests.xml"/>
<property name="project.version" value="1.3.0"/>
<property name="project.app" value="Edirom-Online-Backend"/>
<property name="project.title" value="Edirom Online Backend"/>
<property name="repo.target" value="${project.app}"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="build-xar"/>
<property name="tei.dir" value="build-tei"/>
<tstamp/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${tei.dir}"/>
</target>
<!-- Download TEI Zip file and extract it to ${tei.dir} -->
<target name="download-tei">
<mkdir dir="${tei.dir}"/>
<get src="https://github.com/TEIC/Stylesheets/releases/download/v7.58.0/tei-xsl-7.58.0.zip" dest="${tei.dir}/tei-xsl-7.58.0.zip"/>
<unzip src="${tei.dir}/tei-xsl-7.58.0.zip" dest="${tei.dir}"/>
</target>
<target name="build-plus">
<copy todir="${build.dir}" preservelastmodified="true">
<fileset dir="${basedir}">
<include name="*"/>
<include name="data/locale/"/>
<include name="data/prefs/"/>
<include name="data/xql/"/>
<include name="data/xqm/"/>
<include name="data/xslt/*"/>
<include name="data/xslt/i18n/"/>
<include name="data/xslt/tei/profiles/**"/>
<include name="help/**"/>
<include name="index/**"/>
<exclude name="help/images/">
<!-- exclude help images and icon.png here because the below filterset
would alter their contents and render them unreadable.
Will be copied in anoter copy statement without filterset. -->
</exclude>
<exclude name="icon.png"/>
<!-- exclude all files and dirs starting with "build"-->
<exclude name="build*"/>
</fileset>
<fileset dir="${basedir}">
<include name="testing/**"/>
</fileset>
<filterset begintoken="@" endtoken="@">
<filter token="project.version" value="${project.version}"/>
<filter token="project.app" value="${project.app}"/>
<filter token="project.title" value="${project.title}"/>
<filter token="repo.target" value="${repo.target}"/>
</filterset>
</copy>
<!-- Copy TEI Stylesheets from ${tei.dir} -->
<mkdir dir="${build.dir}/data/xslt/tei/Stylesheets"/>
<copy todir="${build.dir}/data/xslt/tei/Stylesheets" preservelastmodified="true">
<fileset dir="${tei.dir}/xml/tei/stylesheet">
<include name="catalog.xml"/>
<include name="i18n.xml"/>
<include name="html/"/>
<include name="common/"/>
<include name="VERSION"/>
</fileset>
</copy>
<copy todir="${build.dir}" preservelastmodified="true">
<!-- copy help images and icon.png in separate copy statement because above filterset
would modify their contents and render them unreadable -->
<fileset dir="${basedir}">
<include name="help/images/"/>
<include name="icon.png"/>
</fileset>
</copy>
<!-- Copy CITATION.cff to resources -->
<copy file="${basedir}/CITATION.cff" tofile="${build.dir}/resources/CITATION.cff" overwrite="true"/>
</target>
<target name="xar" depends="clean,download-tei,build-plus">
<mkdir dir="${dist.dir}"/>
<zip basedir="${build.dir}" destfile="${dist.dir}/${project.app}-${project.version}-${DSTAMP}-${TSTAMP}.xar"/>
</target>
</project>