-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
executable file
·61 lines (51 loc) · 2.21 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
<project name="PythonPlugin" default="export.jar" basedir=".">
<!-- Read property overrides/definitions from user's home -->
<property file="${user.home}/build.properties"/>
<property name="webcat.plugin.export.dir" value="."/>
<target name="check.properties"
description="Determine if the Properties file should be updated from config.plist">
<condition property="should.regenerate.properties">
<and>
<isset property="webcat.plugin.tools.dir"/>
<not>
<uptodate
srcfile="src/config.plist"
targetfile="${basedir}/Properties"/>
</not>
</and>
</condition>
</target>
<target name="regenerate.properties" if="should.regenerate.properties"
depends="check.properties"
description="Extract metadata from plug-in's config.plist file and place
it into Properties file. This step is optional, and is only executed
if you have the appropriate perl support installed, as indicated
in your ~/build.properties file. If you don't have this support, you
can update your Properties file manually instead.">
<exec executable="perl" failonerror="true">
<arg file="${webcat.plugin.tools.dir}/PlistToProperties.pl"/>
<arg value="src/config.plist"/>
<arg value="${basedir}/Properties"/>
<env key="PERLLIB" path="${webcat.perl.lib.dir}"/>
</exec>
</target>
<target name="init"
depends="regenerate.properties"
description="Set the build date in the Properties file">
<tstamp/>
<propertyfile file="Properties"
comment="This file is automatically rewritten by ANT. Hand-edits may be lost.">
<entry key="version.date" value="${DSTAMP}"/>
</propertyfile>
<property file="Properties"/>
<property name="full.version"
value="${version.major}.${version.minor}.${version.revision}"/>
<property name="generated.jar"
value="${webcat.plugin.export.dir}/${ant.project.name}_${full.version}.jar"/>
</target>
<target name="export.jar"
depends="init"
description="Build a distributable jar file for this plug-in">
<jar destfile="${generated.jar}" basedir="src"/>
</target>
</project>