File: build.xml

package info (click to toggle)
webdeveloper 1.1.9-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,044 kB
  • sloc: xml: 108; makefile: 18
file content (119 lines) | stat: -rwxr-xr-x 4,031 bytes parent folder | download
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0"?>

<project name="web-developer" default="build">
  <!-- Main targets  -->
  <target name="all" depends="build,test" description="Build and test"/>

  <!-- Initialize settings -->
  <target name="init" description="Initialize settings">
    <tstamp>
      <format pattern="MMMM d, yyyy" property="build.date"/>
    </tstamp>
    <filterset id="common.filters">
      <filter token="build.date" value="${build.date}"/>
      <filtersfile file="config.properties"/>
    </filterset>
  </target>

  <!-- Clean up the build -->
  <target name="clean" description="Clean up the build">
    <echo level="info" message="Cleaning up the build"/>
    <delete dir="chrome"/>
    <delete file="install.js"/>
    <delete file="install.rdf"/>
  </target>

  <!-- Build -->
  <target name="build" depends="init,clean" description="Build">
    <delete file="builds/web-developer.xpi"/>
    <echo level="info" message="Creating extension structure"/>
    <copy todir="chrome/content">
      <fileset dir="source/content_common">
        <exclude name="**/*.gif"/>
        <exclude name="**/*.png"/>
      </fileset>
      <filterset refid="common.filters"/>
    </copy>
    <copy todir="chrome/content">
      <fileset dir="source/content_common">
        <include name="**/*.gif"/>
        <include name="**/*.png"/>
      </fileset>
    </copy>
    <copy todir="chrome/locale">
      <fileset dir="source/locale_common"/>
    </copy>
    <copy todir="chrome/skin">
      <fileset dir="source/skin_common"/>
    </copy>
    <echo level="info" message="Compressing extension code"/>
    <zip compress="false" destfile="chrome/webdeveloper.jar">
      <zipfileset dir="chrome"/>
    </zip>
    <delete dir="chrome/content"/>
    <delete dir="chrome/locale"/>
    <delete dir="chrome/skin"/>
    <echo level="info" message="Building extension file"/>
    <copy file="common_install.js" tofile="install.js">
      <filterset refid="common.filters"/>
    </copy>
    <copy file="common_install.rdf" tofile="install.rdf">
      <filterset refid="common.filters"/>
    </copy>
    <zip destfile="builds/web-developer.xpi">
      <zipfileset dir="chrome" prefix="chrome"/>
      <zipfileset file="chrome.manifest"/>
      <zipfileset file="install.js"/>
      <zipfileset file="install.rdf"/>
      <zipfileset file="license.txt"/>
    </zip>
    <antcall target="clean"/>
  </target>

  <!-- Test -->
  <target name="test" depends="init,clean" description="Test">
    <delete file="builds/web-developer-test.xpi"/>
    <echo level="info" message="Creating extension structure"/>
    <copy todir="chrome/content">
      <fileset dir="source/content_common">
        <exclude name="**/*.gif"/>
        <exclude name="**/*.png"/>
      </fileset>
      <filterset refid="common.filters"/>
    </copy>
    <copy todir="chrome/content">
      <fileset dir="source/content_common">
        <include name="**/*.gif"/>
        <include name="**/*.png"/>
      </fileset>
    </copy>
    <copy todir="chrome/locale/en-US">
      <fileset dir="source/locale_common/ja-JP"/>
    </copy>
    <copy todir="chrome/skin">
      <fileset dir="source/skin_common"/>
    </copy>
    <echo level="info" message="Compressing extension code"/>
    <zip compress="false" destfile="chrome/webdeveloper.jar">
      <zipfileset dir="chrome"/>
    </zip>
    <delete dir="chrome/content"/>
    <delete dir="chrome/locale"/>
    <delete dir="chrome/skin"/>
    <echo level="info" message="Building extension file"/>
    <copy file="common_install.js" tofile="install.js">
      <filterset refid="common.filters"/>
    </copy>
    <copy file="common_install.rdf" tofile="install.rdf">
      <filterset refid="common.filters"/>
    </copy>
    <zip destfile="builds/web-developer-test.xpi">
      <zipfileset dir="chrome" prefix="chrome"/>
      <zipfileset file="chrome.manifest"/>
      <zipfileset file="install.js"/>
      <zipfileset file="install.rdf"/>
      <zipfileset file="license.txt"/>
    </zip>
    <antcall target="clean"/>
  </target>
</project>