-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
57 lines (57 loc) · 1.74 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
<project name="jzbot2" default="archive">
<target name="compile">
<mkdir dir="classes" />
<javac srcdir="src" destdir="classes" encoding="UTF-8" debug="true" debuglevel="lines,vars,source">
<classpath>
<fileset dir="lib">
</fileset>
</classpath>
</javac>
</target>
<target name="archive">
<!-- We're using a tar here instead of a tar.gz or a zip so
that rsync uploads go really fast. If we use a tar, then the
majority of the file remains the same, so rsync doesn't
upload it. If we use a tar.gz, then the gzip algorithm causes
almost the entire file to be different, so rsync has to
upload the whole thing. -->
<tar destfile="jzbot2-old.tar">
<fileset dir=".">
<include name="**/*" />
<exclude name="**/.svn" />
<exclude name="jzbot2-old.tar" />
<exclude name="storage" />
<exclude name="storage/**" />
</fileset>
</tar>
</target>
<target name="make-dist">
<mkdir dir="${user.home}/jzbot2-make-dist-folder/jzbot" />
<copy todir="${user.home}/jzbot2-make-dist-folder/jzbot">
<fileset dir=".">
<include name="**/*" />
<exclude name="**/.svn" />
<exclude name="**/.*" />
<exclude name="jzbot2-old.tar" />
<exclude name="storage" />
<exclude name="storage/**" />
</fileset>
</copy>
<tar destfile="${user.home}/jzbot2.tar.gz" compression="gzip">
<fileset dir="${user.home}/jzbot2-make-dist-folder">
<include name="**/*" />
</fileset>
</tar>
<delete dir="${user.home}/jzbot2-make-dist-folder">
</delete>
</target>
<target name="upload">
<exec executable="rsync">
<arg value="-vvv" />
<arg value="-e" />
<arg value="ssh" />
<arg value="jzbot2-old.tar" />
<arg value="[email protected]:/jzbot2/jzbot2-old.tar.gz" />
</exec>
</target>
</project>