Permalink
Browse files

Refactor build output

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 456717975b20766971ee221e091490f99b339be4
Showing with 8 additions and 8 deletions.
  1. +1 −1 Makefile
  2. +1 −1 makexpi.local.example
  3. +6 −6 makexpi.sh
View
@@ -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
View
@@ -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/
View
@@ -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"
@@ -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.