This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
55 lines (49 loc) · 2.13 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
<?xml version="1.0" encoding="UTF-8"?>
<project default="xpi" name="[email protected]">
<property file="build_info.properties"/>
<property name="project.version" value="${build.major.number}.${build.minor.number}.${build.revision.number}_build${build.buildnum.number}"/>
<property name="project.dir" value="src/[email protected]" />
<property name="project.app" value="quotesalute"/>
<property name="dist.dir" value="dist/"/>
<target name="update-version">
<replaceregexp
file="${project.dir}/install.rdf"
match='(<em:version>).*(</em:version>)'
replace="\1${project.version}\2"
byline="true"
/>
</target>
<target name="bump">
<propertyfile file="build_info.properties">
<entry key="build.buildnum.number" type="int" operation="+" value="1"/>
</propertyfile>
</target>
<target name="bump-revision">
<antcall target="bump" />
<propertyfile file="build_info.properties">
<entry key="build.revision.number" type="int" operation="+" value="1"/>
</propertyfile>
<antcall target="update-version" />
</target>
<target name="bump-minor">
<antcall target="bump"/>
<propertyfile file="build_info.properties">
<entry key="build.minor.number" type="int" operation="+" value="1"/>
<entry key="build.revision.number" type="int" value="0"/>
</propertyfile>
<antcall target="update-version" />
</target>
<target name="bump-major">
<antcall target="bump" />
<propertyfile file="build_info.properties">
<entry key="build.major.number" type="int" operation="+" value="1"/>
<entry key="build.minor.number" type="int" value="0"/>
<entry key="build.revision.number" type="int" value="0"/>
</propertyfile>
<antcall target="update-version" />
</target>
<target name="xpi">
<antcall target="bump-revision" />
<zip basedir="${project.dir}" destfile="${dist.dir}/${project.app}-${project.version}.xpi" />
</target>
</project>