-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.xml
111 lines (93 loc) · 4.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="all" name="I2PControl">
<!-- Include property files so that values can be easily overridden.
Users should create an override.properties file to make changes.
-->
<property file="override.properties"/>
<target name="all" depends="clean,plugin,release" />
<target name="local" depends="clean,plugin">
<property name="i2p.plugindir" value="${user.home}/.i2p/plugins/I2PControl" />
<delete dir="${i2p.plugindir}"/>
<mkdir dir="${i2p.plugindir}"/>
<mkdir dir="${i2p.plugindir}/lib"/>
<copy file="src/build/I2PControl.jar" todir="${i2p.plugindir}/lib" overwrite="true" />
<copy todir="${i2p.plugindir}" >
<fileset dir="plugin" includes="**"/>
</copy>
</target>
<target name="jar">
<ant dir="src" target="build" />
</target>
<target name="war" depends="clean" >
<ant dir="src" target="war" />
<copy file="src/build/jsonrpc.war" todir="." />
</target>
<target name="plugin" depends="jar">
<!-- get version number -->
<buildnumber file="scripts/build.number" />
<!-- change in I2PControlVersion.java also! -->
<property name="release.number" value="0.12.0" />
<!-- make the update xpi2p -->
<mkdir dir="plugin/lib"/>
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<exec executable="pack200" failonerror="true">
<arg value="--no-gzip"/>
<arg value="--effort=9"/>
<arg value="plugin/lib/I2PControl.jar.pack" />
<arg value="src/build/I2PControl.jar" />
</exec>
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="update-only=true" />
</exec>
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-b${build.number}" />
</exec>
<input message="Enter su3 signing key password:" addproperty="release.password.su3" />
<fail message="You must enter a password." >
<condition>
<equals arg1="${release.password.su3}" arg2=""/>
</condition>
</fail>
<!-- this will fail if no su3 keys exist, as it needs the password twice -->
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" />
</exec>
<move file="I2PControl.xpi2p" tofile="I2PControl-update.xpi2p" overwrite="true" />
<move file="I2PControl.su3" tofile="I2PControl-update.su3" overwrite="true" />
<!-- make the install xpi2p -->
<copy file="LICENSE.txt" todir="plugin/" overwrite="true" />
<copy file="LICENSE-jBCrypt.txt" todir="plugin/" overwrite="true" />
<copy file="README.txt" todir="plugin/" overwrite="true" />
<copy file="scripts/clients.config" todir="plugin/" overwrite="true" />
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<copy file="scripts/i2pcontrol.py" todir="plugin/" overwrite="true" />
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-b${build.number}" />
</exec>
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" />
</exec>
</target>
<target name="release" depends="plugin" />
<target name="distclean" depends="clean" />
<target name="format">
<exec executable="scripts/format.sh" failonerror="true" />
</target>
<target name="clean" >
<ant dir="src" target="clean" />
<delete file="plugin/clients.config" />
<delete file="plugin/plugin.config" />
<delete file="plugin/console/webapp.config" />
<delete file="plugin/lib/I2PControl.jar.pack" />
<delete file="plugin/console/webapps/I2PControl.war.pack" />
<delete file="plugin/LICENSE.txt" />
<delete file="plugin/LICENSE-jBCrypt.txt" />
<delete file="plugin/README.txt" />
<delete file="plugin/i2pcontrol.py" />
<delete file="I2PControl.xpi2p" />
<delete file="I2PControl-update.xpi2p" />
<delete file="I2PControl.su3" />
<delete file="I2PControl-update.su3" />
<delete file="jsonrpc.war" />
</target>
</project>