Skip to content

Commit

Permalink
Refactor build output
Browse files Browse the repository at this point in the history
We have to link to a specific version in update.rdf, not just to
latest.xpi, because firefox seems to fetch the update.rdf only once and
when this xpi is changed before the user chooses to update the hash is
wrong.

So for now put versioned .xpis into pkg/, make a symlink to latest.xpi
there and also put the update.rdf there that links to the latest xpi
(not: latest.xpi). The whole pkg/ directory can then be rsync'd to a web
server.
  • Loading branch information
yath committed Mar 20, 2011
1 parent c294ab4 commit 4567179
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -9,6 +9,6 @@ prerelease: pkg
pkg:
mkdir pkg
clean:
rm -f pkg/*.xpi src/install.rdf guardrail-latest-update.rdf
rm -f pkg/*.xpi src/install.rdf pkg/latest-update.rdf

.PHONY: clean prerelease
2 changes: 1 addition & 1 deletion makexpi.local.example
@@ -1,3 +1,3 @@
UHURA=/home/foo/mxtools/uhura
KEYFILE=/home/foo/foo-signkey.pem
UPDATE_URL=http://yourhost.example/foo.xpi
UPDATE_BASEURL=http://yourhost.example/
12 changes: 6 additions & 6 deletions makexpi.sh
Expand Up @@ -38,7 +38,7 @@ fi

VERSION="0.9.9.development.$(date +%s)"

XPI_NAME="pkg/$APP_NAME-$VERSION.xpi"
XPI_NAME="pkg/$VERSION.xpi"
[ -d pkg ] || mkdir pkg

cd "src"
Expand All @@ -59,14 +59,14 @@ fi

if [ -x "$UHURA" ]; then
echo "Generating update.rdf..." >&2
if [ -z "$KEYFILE" -o -z "$UPDATE_URL" ]; then
echo "Either KEYFILE or UPDATE_URL are not specified. Exiting." >&2
if [ -z "$KEYFILE" -o -z "$UPDATE_BASEURL" ]; then
echo "Either KEYFILE or UPDATE_BASEURL are not specified. Exiting." >&2
exit 1
fi
[ -e ../latest-update.rdf ] && rm -f ../latest-update.rdf
"$UHURA" -o ../latest-update.rdf -k "$KEYFILE" -h -v ../"$XPI_NAME" "$UPDATE_URL"
[ -e ../pkg/latest-update.rdf ] && rm -f ../pkg/latest-update.rdf
"$UHURA" -o ../pkg/latest-update.rdf -k "$KEYFILE" -h -v ../"$XPI_NAME" "$UPDATE_BASEURL$(basename "$XPI_NAME")"
else
echo "No working Uhura installation found, not generating update.rdf." >&2
fi

ln -sf "$XPI_NAME" "../latest.xpi"
ln -sf "$(basename "$XPI_NAME")" "../pkg/latest.xpi"

0 comments on commit 4567179

Please sign in to comment.