-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.xml
40 lines (40 loc) · 1.68 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
<?xml version="1.0" encoding="UTF-8"?>
<project default="all" name="eXist-db Demo Apps">
<property file="local.build.properties"/>
<property file="build.properties"/>
<property name="build" value="./build"/>
<property name="server.url" value="http://demo.exist-db.org/exist/apps/public-repo/public/"/>
<condition property="git.commit" value="${git.commit}" else="">
<isset property="git.commit"/>
</condition>
<target name="all" depends="xar"/>
<target name="rebuild" depends="clean,all"/>
<target name="clean">
<delete dir="${build}"/>
<delete file="expath-pkg.xml"/>
</target>
<target name="xar">
<mkdir dir="${build}"/>
<copy file="expath-pkg.xml.tmpl" tofile="expath-pkg.xml" filtering="true" overwrite="true">
<filterset>
<filter token="project.name" value="${project.name}"/>
<filter token="project.version" value="${project.version}"/>
</filterset>
</copy>
<zip basedir="." destfile="${build}/${project.name}-${project.version}${git.commit}.xar">
<exclude name="${build}/*"/>
<exclude name=".git*"/>
<exclude name="*.tmpl"/>
<exclude name="*.properties"/>
</zip>
</target>
<target name="upload">
<input message="Enter password:" addproperty="server.pass" defaultvalue="">
<handler type="secure"/>
</input>
<property name="xar" value="${project.name}-${project.version}${git.commit}.xar"/>
<exec executable="curl">
<arg line="-T ${build}/${xar} -u admin:${server.pass} ${server.url}/${xar}"/>
</exec>
</target>
</project>