From 8675c3dd807ab02c8fc6ccc604b36e0379dd3fdf Mon Sep 17 00:00:00 2001 From: Mattijs Date: Wed, 11 Nov 2026 20:35:06 +0100 Subject: [PATCH] update manifest and build with proper id and versioning --- manifest.json | 2 +- tools/build.sh | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index d5a76b9..afcd38f 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": "Unload tabs on demand, or automatically after they have been idle for a while.", "browser_specific_settings": { "gecko": { - "id": "tabpark@neutrino.local", + "id": "tabpark@nxdomain.nl", "strict_min_version": "140.0", "data_collection_permissions": { "required": ["none"] diff --git a/tools/build.sh b/tools/build.sh index 7758432..35294c5 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -1,13 +1,16 @@ #!/bin/bash # Builds the loadable copy of the extension: -# dist/tabpark unpacked, for about:debugging -# dist/tabpark.xpi zipped, for handing over or uploading to AMO +# dist/tabpark unpacked, for about:debugging +# dist/tabpark--unsigned.xpi zipped, for uploading to AMO set -euo pipefail SRC="$(cd "$(dirname "$0")/.." && pwd)" OUT="$SRC/dist" DEST="$OUT/tabpark" +VERSION="$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["version"])' "$SRC/manifest.json")" +XPI="$OUT/tabpark-$VERSION-unsigned.xpi" + rm -rf "$OUT" mkdir -p "$DEST" @@ -16,11 +19,10 @@ cp "$SRC"/manifest.json "$SRC"/common.js "$SRC"/background.js \ "$SRC"/options.html "$SRC"/options.js "$SRC"/options.css "$DEST"/ cp -r "$SRC"/icons "$DEST"/ -python3 - "$OUT" <<'PY' +python3 - "$OUT" "$XPI" <<'PY' import os, sys, zipfile -out = sys.argv[1] -src = os.path.join(out, 'tabpark') -xpi = os.path.join(out, 'tabpark.xpi') +src = os.path.join(sys.argv[1], 'tabpark') +xpi = sys.argv[2] with zipfile.ZipFile(xpi, 'w', zipfile.ZIP_DEFLATED) as archive: for root, _, files in os.walk(src): for filename in files: @@ -28,15 +30,15 @@ with zipfile.ZipFile(xpi, 'w', zipfile.ZIP_DEFLATED) as archive: archive.write(full, os.path.relpath(full, src)) PY -cat > "$OUT/README.md" <<'MD' +cat > "$OUT/README.md" < Load Temporary Add-on > pick -`tabpark/manifest.json`. +\`tabpark/manifest.json\`. -`tabpark.xpi` is the same files zipped, for handing to someone else or -uploading to addons.mozilla.org. +\`tabpark-$VERSION-unsigned.xpi\` is the same files zipped, for uploading to +addons.mozilla.org. It is unsigned; AMO signs it as part of submission. MD -echo "built $DEST and $OUT/tabpark.xpi" +echo "built $DEST and $XPI"