-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.xml
65 lines (52 loc) · 2.24 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
<?xml version="1.0" ?>
<!-- In order to build consoleExport extension run: $ant build (in the extension dir)
The final xpi file should be located in a release directory -->
<project name="consoleExport" basedir="." default="build">
<!-- Directories -->
<property name="build.dir" value="release"/>
<!-- Properties -->
<property file="ant.properties"/>
<!-- Clean -->
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<!-- Build -->
<target name="build" depends="clean">
<!-- Copy defaults directory -->
<copy todir="${build.dir}/defaults">
<fileset dir="defaults">
<include name="**/*.js"/>
</fileset>
</copy>
<!-- Copy chrome directory -->
<copy todir="${build.dir}/chrome">
<fileset dir="chrome">
<include name="**/*.js"/>
<include name="**/*.xul"/>
<include name="**/*.properties"/>
<include name="**/*.css"/>
<include name="**/*.png"/>
</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}"/>
<copy file="update.rdf" 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 consoleExport.xpi file -->
<zip destfile="${build.dir}/consoleExport-${VERSION}${RELEASE}.xpi"
basedir="${build.dir}" update="true" />
<!-- Generate update.rdf file -->
<replace file="${build.dir}/update.rdf" propertyFile="ant.properties">
<replacefilter token="@VERSION@" property="VERSION"/>
<replacefilter token="@RELEASE@" property="RELEASE"/>
</replace>
<!-- Final version message -->
<echo message="ConsoleExport version: ${VERSION}${RELEASE}"/>
</target>
</project>