Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enhance build script to make it easier to create release builds. Fixes

  • Loading branch information...
commit b1be51a5ef6f34bc4af5049ee00c20ef4e5d2ba3 1 parent 61f2f3a
@whimboo whimboo authored
Showing with 35 additions and 17 deletions.
  1. +1 −0  .gitignore
  2. +5 −5 README.md
  3. +29 −12 build.xml
View
1  .gitignore
@@ -1,3 +1,4 @@
+./xpi/
{8620c15f-30dc-4dba-a131-7c5d20cf4a29}
*.xpi
.DS_Store
View
10 README.md
@@ -11,15 +11,15 @@ Nightly Tester Tools is an addon for aiding testers of nightly builds of Mozilla
# Install
You can install the latest stable NTT from [addons.mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/6543/). To install for development, clone the repo:
- git clone git://github.com/mozilla/nightlytt.git
+ git clone git://github.com/mozilla/nightlytt.git
then add a file titled '{8620c15f-30dc-4dba-a131-7c5d20cf4a29}' to the "extensions" directory in your [profile folder](http://kb.mozillazine.org/Profile_folder) with the text:
- ~/nightlytt/
+ ~/nightlytt/
or whatever the path to your nightlytt folder is.
-To package the extension into an xpi for distribution simply `ant` and the default build script/target will be invoked:
+To package the extension into an xpi for distribution simply `ant` and the default dev script/target will be invoked:
ant
@@ -27,9 +27,9 @@ You can override the build number used in the filename:
ant -Dbuild.number=1
-To build for release (no build version in filename):
+To build for release (no build number in filename):
- ant -Drelease=true
+ ant release
# Development
All bugs are reported to the Nightly Tester Tools component at bugzilla.mozilla.org. [bug list](https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&component=Nightly%20Tester%20Tools&product=Other%20Applications), [file a bug](https://bugzilla.mozilla.org/enter_bug.cgi?product=Other%20Applications&component=Nightly%20Tester%20Tools). Check out [the wiki](https://wiki.mozilla.org/Auto-tools/Projects/NightlyTesterTools) for a list of current and proposed features and feel free to file bugs and submit patches.
View
41 build.xml
@@ -1,24 +1,41 @@
<?xml version="1.0"?>
-<project name="nightlytt" default="package">
+<project name="nightlytt" default="dev">
+ <!-- Directories -->
+ <property name="xpi.dir" value="./xpi"/>
+
<tstamp>
<format property="build.number" pattern="yyyyMMddHHmm"/>
</tstamp>
- <target name="getversion" unless="build.version">
+ <target name="release" depends="version"
+ description="Builds a release version">
+ <property name="xpi.filename" value="${ant.project.name}-${build.version}.xpi" />
+
+ <antcall target="dev" />
+ </target>
+
+ <target name="dev" depends="clean, version"
+ description="Builds a development version">
+ <property name="xpi.filename" value="${ant.project.name}-${build.version}-${build.number}.xpi" />
+
+ <mkdir dir="${xpi.dir}" />
+ <zip destfile="${xpi.dir}/${xpi.filename}"
+ basedir="extension"
+ excludesfile=".gitignore"/>
+ </target>
+
+ <target name="clean"
+ description="Clean-up XPI directory">
+ <delete dir="${xpi.dir}"/>
+ </target>
+
+ <target name="version" unless="build.version"
+ description="Shows the current version">
<xmlproperty file="extension/install.rdf" collapseAttributes="true"/>
<property name="build.version" value="${RDF.Description.em:version}"/>
+
<echo>build.version: ${build.version}</echo>
</target>
-
- <target name="package" depends="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}"/>
- <zip destfile="${package.filename}" basedir="extension" excludesfile=".gitignore"/>
- <echo>package.filename: ${package.filename}</echo>
- </target>
</project>
Please sign in to comment.
Something went wrong with that request. Please try again.