forked from kb-dk/MerMEId
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
executable file
·67 lines (59 loc) · 2.56 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
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="mermeid">
<property name="project.app" value="mermeid"/>
<property name="build.dir" value="build"/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete file="expath-pkg.xml"/>
</target>
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="xar" depends="init,expath-pkg.xml">
<zip destfile="${build.dir}/${project.app}-${project.version}.xar">
<fileset dir=".">
<include name="**/*.*"/>
<exclude name="${build.dir}/**"/>
<exclude name="build.xml"/>
<exclude name="Dockerfile"/>
<exclude name="jetty-exist-additional-config/**"/>
<exclude name="orbeon-additional-config/**"/>
<exclude name="orbeon-form-runner.jar/**"/>
<exclude name="*.patch"/>
<exclude name=".gitignore"/>
<exclude name=".git"/>
<exclude name=".github/**"/>
<exclude name=".dockerignore"/>
<exclude name="docker-compose.yml"/>
<exclude name="*build.properties"/>
<exclude name="*.template"/>
<exclude name="trunk/**"/>
</fileset>
</zip>
</target>
<available file=".git" type="dir" property="git.present"/>
<target name="git.revision" description="Store git revision in ${project.version}" if="git.present">
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="describe"/>
<arg value="--tags"/>
<arg value="--always"/>
<arg value="HEAD"/>
</exec>
<condition property="project.version" value="${git.revision}" else="unknown">
<and>
<isset property="git.revision"/>
<length string="${git.revision}" trim="yes" length="0" when="greater"/>
</and>
</condition>
<echo message="${project.version}" />
</target>
<target name="expath-pkg.xml" depends="git.revision" description="build expath-pkg.xml from template">
<copy file="expath-pkg.xml.template" tofile="expath-pkg.xml" overwrite="yes">
<filterchain>
<replacetokens>
<token key="repository.version" value="${project.version}" />
</replacetokens>
</filterchain>
</copy>
</target>
</project>