Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 690ed9cd64
Fetching contributors…

Cannot retrieve contributors at this time

114 lines (91 sloc) 4.263 kB
<?xml version="1.0"?>
<project name="dojofirebugextension" default="release-all" basedir=".">
<property name="dist.dir" value="dist/" />
<property name="build.dir" value="build/" />
<property file="version.properties" />
<property name="xpi.filename" value="${ant.project.name}-${VERSION}${RELEASE}.xpi" />
<target name="xpi" description="zip files into firefox XPI">
<mkdir dir="${dist.dir}" />
<mkdir dir="${dist.dir}/${FBUG_VERSION}" />
<zip destfile="${dist.dir}/${FBUG_VERSION}/${xpi.filename}" basedir="${build.dir}" includes="**/*" />
<checksum
file="${dist.dir}/${FBUG_VERSION}/${xpi.filename}"
property="updateHash"
algorithm="SHA-1"/>
<echo>Update hash is ${updateHash}</echo>
<copy file="update.rdf"
tofile="${dist.dir}/${FBUG_VERSION}/update.rdf"
overwrite="true">
<filterchain>
<replacetokens>
<token key="VERSION" value="${VERSION}"/>
<token key="RELEASE" value="${RELEASE}"/>
<token key="FBUG_VERSION" value="${FBUG_VERSION}" />
<token key="UPDATEHASH" value="${updateHash}"/>
</replacetokens>
</filterchain>
</copy>
<!-- clean up build artifacts after we are done -->
<delete includeemptydirs="true" failonerror="false" dir="${build.dir}"/>
</target>
<target name="prepare" depends="clean">
<mkdir dir="${build.dir}" />
<!-- copy install.rdf and replace tokens -->
<copy file="install.rdf" tofile="${build.dir}/install.rdf" overwrite="true">
<filterchain>
<replacetokens>
<token key="VERSION" value="${VERSION}" />
<token key="RELEASE" value="${RELEASE}" />
<token key="FBUG_VERSION" value="${FBUG_VERSION}" />
</replacetokens>
</filterchain>
</copy>
<copy file="chrome.manifest" tofile="${build.dir}/chrome.manifest" overwrite="true">
</copy>
<copy file="license.txt" tofile="${build.dir}/license.txt" overwrite="true">
</copy>
<copy todir="${build.dir}">
<fileset dir="${basedir}" includes="content/**/*" excludes="content/**/Thumbs.db, content/fbtest/, content/dojo/todo.txt" />
<fileset dir="${basedir}" includes="defaults/**/*" excludes="default/**/Thumbs.db" />
<fileset dir="${basedir}" includes="locale/**/*" excludes="locale/**/Thumbs.db" />
<fileset dir="${basedir}" includes="skin/**/*" excludes="skin/**/Thumbs.db" />
</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="build.xml" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="clean-amo" depends="clean">
<delete dir="${dist.dir}/${FBUG_VERSION}/${ant.project.name}-${VERSION}${RELEASE}-amo.xpi" />
</target>
<target name="clean-getfirebug" depends="clean">
<delete dir="${dist.dir}/${FBUG_VERSION}/${xpi.filename}" />
</target>
<!-- Remove update URL, this is necessary for AMO -->
<target name="disableUpdate">
<echo message="Disabling update in ${build.dir}/install.rdf file"/>
<replaceregexp file="${build.dir}/install.rdf"
match="em:updateURL=(.*)https://getfirebug.com/releases/dojofirebugextension/${FBUG_VERSION}/update.rdf(.*)"
replace=""/>
</target>
<!-- Build AMO Release -->
<target name="release-amo" depends="clean-amo, prepare">
<antcall target="disableUpdate" />
<antcall target="xpi">
<param name="xpi.filename" value="${ant.project.name}-${VERSION}${RELEASE}-amo.xpi"/>
</antcall>
</target>
<!-- Build getfirebug Release -->
<target name="release-getfirebug" depends="clean-getfirebug, prepare">
<antcall target="xpi"/>
</target>
<!-- Default Release target -->
<target name="release-all">
<!-- order is important since both antcall creates the update.rdf, and it's only
valid for the 2nd call (TODO: improve that) -->
<antcall target="release-amo"/>
<antcall target="release-getfirebug"/>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.