forked from shabanovd/eXgit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
45 lines (39 loc) · 1.57 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
<?xml version="1.0" encoding="UTF-8"?>
<project default="all" name="dashboard">
<property name="project.version" value="0.2.2"/>
<property name="project.app" value="eXgit"/>
<property name="build.dir" 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="clean">
<delete dir="${build.dir}"/>
</target>
<target name="all" depends="xar"/>
<target name="rebuild" depends="clean,xar"/>
<target name="xar">
<mkdir dir="${build.dir}"/>
<zip destfile="${build.dir}/${project.app}-${project.version}${git.commit}.xar">
<fileset dir=".">
<include name="*.jar"/>
<include name="*.xml"/>
<exclude name=".git*"/>
<exclude name="*.tmpl"/>
<exclude name="*.properties"/>
</fileset>
</zip>
</target>
<target name="upload">
<input message="Enter username:" addproperty="server.login" defaultvalue="admin">
<!-- <handler type="greedy"/> -->
</input>
<input message="Enter password:" addproperty="server.pass" defaultvalue="">
<handler type="secure"/>
</input>
<property name="xar" value="${project.app}-${project.version}.xar"/>
<exec executable="curl">
<arg line="-T ${build.dir}/${xar} -u ${server.login}:${server.pass} ${server.url}/${xar}"/>
</exec>
</target>
</project>