-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
63 lines (55 loc) · 2.74 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="firefox extension" default="build">
<property name="extension.guid" value="A6A0B3F6-6D2D-4c55-96C1-7481BEA2EBF8" />
<property name="extension.name" value="datepicker" />
<property name="extension.full.name" value="Date Picker/Calendar" />
<property name="extension.short.name" value="${extension.full.name}" />
<property name="extension.author" value="James Cook" />
<property name="extension.version" value="2.2" />
<property name="base.url" value="http://www.jamescookie.com" />
<property name="extensions.url" value="${base.url}/extensions/" />
<property name="extension.description" value="Quick popup allowing you to view a calendar/pick a date." />
<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=".svn/**"/>
<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_SHORT_NAME" value="${extension.short.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}"/>
<filter token="GUID" value="${extension.guid}"/>
</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>