Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (30 sloc) 1.23 KB
<?xml version="1.0"?>
<project name="memchaser" default="package">
<tstamp>
<format property="build.number" pattern="yyyyMMddHHmm"/>
</tstamp>
<target name="build">
<property name="build.filename" value="extension/${ant.project.name}.xpi"/>
<delete file="${build.filename}"/>
<exec executable="cfx" dir="extension">
<arg value="xpi"/>
</exec>
<echo>build.filename: ${build.filename}</echo>
</target>
<target name="getversion" unless="build.version">
<unzip src="${build.filename}" dest="temp"/>
<xmlproperty file="temp/install.rdf" collapseAttributes="true"/>
<property name="build.version" value="${RDF.Description.em:version}"/>
<delete dir="temp"/>
<echo>build.version: ${build.version}</echo>
</target>
<target name="package" depends="build, getversion">
<condition property="package.filename" value="${ant.project.name}-${build.version}.xpi">
<isset property="release"/>
</condition>
<property name="package.filename" value="${ant.project.name}-${build.version}-${build.number}.xpi"/>
<delete file="${package.filename}"/>
<move file="${build.filename}" tofile="${package.filename}"/>
<echo>package.filename: ${package.filename}</echo>
</target>
</project>