-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.xml
62 lines (48 loc) · 2.15 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
<?xml version="1.0" ?>
<!-- In order to build selectbug extension run: $ant build
The final xpi file should be located in release directory
GETFIREBUG in ant.properties assumes you have fbug and getfirebug.com directories at the same level -->
<project name="selectbug" basedir="." default="build">
<!-- Directories -->
<property name="build.dir" value="build"/>
<!-- Properties -->
<property file="ant.properties"/>
<!-- Clean -->
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<!-- Build -->
<target name="build" depends="clean">
<!-- Copy directory -->
<copy todir="${build.dir}">
<fileset dir=".">
<include name="**/*.js"/>
<include name="**/*.xul"/>
<include name="**/*.properties"/>
<include name="**/*.css"/>
</fileset>
</copy>
<!-- Copy extension installation files and licence.txt -->
<copy file="chrome.manifest" todir="${build.dir}"/>
<copy file="install.rdf" todir="${build.dir}"/>
<copy file="license.txt" todir="${build.dir}"/>
<!-- Update release version from ant.properties file -->
<replace file="${build.dir}/install.rdf" propertyFile="ant.properties">
<replacefilter token="@VERSION@" property="VERSION"/>
<replacefilter token="@RELEASE@" property="RELEASE"/>
</replace>
<!-- Create final selectbug.xpi file -->
<zip destfile="${GETFIREBUG}/selectbug-${VERSION}${RELEASE}.xpi"
basedir="${build.dir}" update="true" />
<!-- Generate update.rdf file -->
<delete file="${GETFIREBUG}/update.rdf"/>
<copy file="update.rdf" todir="${GETFIREBUG}"/>
<replace file="${GETFIREBUG}/update.rdf" propertyFile="ant.properties">
<replacefilter token="@VERSION@" property="VERSION"/>
<replacefilter token="@RELEASE@" property="RELEASE"/>
</replace>
<delete dir="${build.dir}"/>
<!-- Final version message -->
<echo message="SelectBug version: ${VERSION}${RELEASE} in ${GETFIREBUG}"/>
</target>
</project>