-
Notifications
You must be signed in to change notification settings - Fork 55
/
build.xml
executable file
·73 lines (62 loc) · 2.19 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
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="utf-8"?>
<project name="xpi" default="build">
<property file="build.properties" />
<target name="build">
<xmlproperty file="./xpi/install.rdf" collapseAttributes="true" />
<delete dir="dest/build" />
<delete file="dest/${project}.xpi" />
<mkdir dir="dest/build" />
<copy todir="dest/build">
<fileset dir="./xpi">
<include name="**/**" />
<exclude name="chrome.manifest" />
<exclude name="chrome/content/test/**" />
<exclude name="chrome/content/work/**" />
</fileset>
</copy>
<move
file="dest/build/chrome.original.manifest"
tofile="dest/build/chrome.manifest"/>
<zip destfile="dest/${project}.xpi" basedir="dest/build" />
<delete dir="dest/build" />
</target>
<target name="release" depends="build" >
<delete file="${project}.xpi" />
<delete file="update.rdf" />
<checksum file="dest/${project}.xpi" algorithm="SHA-512" property="hash" />
<echo file="update.rdf" ><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:${RDF.Description.em:id}">
<em:updates>
<Seq>
<li>
<Description>
<em:version>${RDF.Description.em:version}</em:version>
<em:targetApplication>
<Description>
<em:id>${RDF.Description.em:targetApplication.Description.em:id}</em:id>
<em:minVersion>${RDF.Description.em:targetApplication.Description.em:minVersion}</em:minVersion>
<em:maxVersion>${RDF.Description.em:targetApplication.Description.em:maxVersion}</em:maxVersion>
<em:updateLink>${updateLink}</em:updateLink>
<em:updateHash>sha512:${hash}</em:updateHash>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>]]></echo>
<property name="update.rdf" location="update.rdf"/>
<exec executable="${mccoy}">
<arg value="-command"/>
<arg value="update"/>
<arg value="-key"/>
<arg value="${key}"/>
<arg value="-updateRDF"/>
<arg value="${update.rdf}"/>
</exec>
<copy file="dest/${project}.xpi" todir="." />
</target>
</project>