forked from eXist-db/shared-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
61 lines (61 loc) · 2.52 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="shared-resources">
<property file="local.build.properties"/>
<property file="build.properties"/>
<property name="build" value="./build"/>
<property name="scripts" value="./resources/scripts"/>
<property name="ace" value="${scripts}/ace"/>
<property name="ace.src" value="./support/ace"/>
<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="ace,xar"/>
<target name="rebuild" depends="clean,all"/>
<target name="ace">
<mkdir dir="${ace}"/>
<mkdir dir="${ace.src}/build/src-min"/>
<mkdir dir="${ace.src}/build/kitchen-sink"/>
<copy todir="${ace}">
<fileset dir="${ace.src}/build/src-min"/>
<fileset dir="${ace.src}/build/kitchen-sink">
<!-- Required for snippet manager -->
<include name="demo.js"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${ace}"/>
<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.abbrev" value="${project.abbrev}"/>
<filter token="project.version" value="${project.version}"/>
</filterset>
</copy>
<zip destfile="${build}/${project.app}-${project.version}${git.commit}.xar">
<fileset dir=".">
<include name="*.*"/>
<include name="resources/**"/>
<include name="content/**"/>
<exclude name=".git*"/>
<exclude name="*.tmpl"/>
<exclude name="*.properties"/>
</fileset>
</zip>
</target>
<target name="upload">
<input message="Enter password:" addproperty="server.pass" defaultvalue="">
<handler type="secure"/>
</input>
<property name="xar" value="${project.app}-${project.version}${git.commit}.xar"/>
<exec executable="curl">
<arg line="-T ${build}/${xar} -u admin:${server.pass} ${server.url}/${xar}"/>
</exec>
</target>
</project>