-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
61 lines (52 loc) · 1.97 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
<?xml version="1.0" ?>
<project name="clockwork-firebug" basedir="." default="build">
<!-- Directories -->
<property name="build.dir" value="./build/"/>
<property name="xpi.filename" value="clockwork-firebug.xpi" />
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="build" depends="clean">
<antcall target="prepare-build" />
<antcall target="create-xpi" />
<antcall target="clean-after-build" />
</target>
<!-- Prepare build files -->
<target name="prepare-build">
<mkdir dir="${build.dir}" />
<!-- Copy all files -->
<copy todir="${build.dir}">
<fileset dir=".">
<include name="**/*.js"/>
<include name="**/*.xul"/>
<include name="**/*.properties"/>
<include name="**/*.css"/>
<include name="**/*.html"/>
<include name="**/*.xml"/>
<include name="**/*.dtd"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
<include name="**/*.svg"/>
<include name="**/*.ico"/>
<include name="**/*.manifest"/>
<include name="**/*.rdf"/>
<include name="**/*.txt"/>
</fileset>
</copy>
<!-- Remove unnecessary *.xml files in the root directory (like e.g. this build file),
but not from sub directories. -->
<delete dir="${build.dir}" includes="*.xml" />
<delete dir="${build.dir}/.idea" />
</target>
<target name="create-xpi">
<zip destfile="${build.dir}/${xpi.filename}" basedir="${build.dir}" update="true" />
</target>
<target name="clean-after-build">
<delete includeemptydirs="true">
<fileset dir="${build.dir}">
<include name="**/*" />
<exclude name="**/*.xpi" />
</fileset>
</delete>
</target>
</project>