Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 14, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
./xpi/
{8620c15f-30dc-4dba-a131-7c5d20cf4a29}
*.xpi
.DS_Store
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ 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

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.
Expand Down
41 changes: 29 additions & 12 deletions build.xml
Original file line number Diff line number Diff line change
@@ -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>