-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
60 lines (51 loc) · 2.43 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="firefox extension" default="build">
<property name="extension.name" value="aub" />
<property name="extension.full.name" value="Advanced URL Builder" />
<property name="extension.author" value="James Cook" />
<property name="extension.version" value="1.7" />
<property name="base.url" value="http://www.jamescookie.com" />
<property name="extensions.url" value="${base.url}/extensions/" />
<property name="extension.description" value="Append selected text to the URL of your favourite site." />
<property name="build.directory" value="build" />
<property name="tmp.directory" value="tmp" />
<target name="build" depends="clean,increment.version">
<mkdir dir="${build.directory}"/>
<mkdir dir="${tmp.directory}"/>
<property file="version.properties"/>
<copy todir="${tmp.directory}">
<fileset dir="${extension.name}">
<exclude name="CVS/**"/>
<exclude name="**/*.png"/>
</fileset>
<filterset>
<filter token="AUTHOR" value="${extension.author}"/>
<filter token="VERSION" value="${extension.version}.${build.number}"/>
<filter token="EXTENSION" value="${extension.name}"/>
<filter token="EXTENSION_FULL" value="${extension.full.name}"/>
<filter token="BASE_URL" value="${base.url}"/>
<filter token="EXTENSIONS_URL" value="${extensions.url}"/>
<filter token="DESCRIPTION" value="${extension.description}"/>
</filterset>
</copy>
<copy todir="${tmp.directory}">
<fileset dir="${extension.name}">
<include name="**/*.png"/>
</fileset>
</copy>
<zip destfile="${build.directory}/${extension.name}-${extension.version}.${build.number}.xpi">
<fileset dir="${tmp.directory}">
</fileset>
</zip>
<echo message="*** Built version: ${build.number} ***"/>
</target>
<target name="clean">
<delete dir="${build.directory}" failonerror="true"/>
<delete dir="${tmp.directory}" failonerror="true"/>
</target>
<target name="increment.version">
<propertyfile file="version.properties" comment="Build version info">
<entry key="build.number" default="0" type="int" operation="+" value="1"/>
</propertyfile>
</target>
</project>