update manifest and build with proper id and versioning
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"description": "Unload tabs on demand, or automatically after they have been idle for a while.",
|
"description": "Unload tabs on demand, or automatically after they have been idle for a while.",
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "tabpark@neutrino.local",
|
"id": "tabpark@nxdomain.nl",
|
||||||
"strict_min_version": "140.0",
|
"strict_min_version": "140.0",
|
||||||
"data_collection_permissions": {
|
"data_collection_permissions": {
|
||||||
"required": ["none"]
|
"required": ["none"]
|
||||||
|
|||||||
+13
-11
@@ -1,13 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Builds the loadable copy of the extension:
|
# Builds the loadable copy of the extension:
|
||||||
# dist/tabpark unpacked, for about:debugging
|
# dist/tabpark unpacked, for about:debugging
|
||||||
# dist/tabpark.xpi zipped, for handing over or uploading to AMO
|
# dist/tabpark-<version>-unsigned.xpi zipped, for uploading to AMO
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SRC="$(cd "$(dirname "$0")/.." && pwd)"
|
SRC="$(cd "$(dirname "$0")/.." && pwd)"
|
||||||
OUT="$SRC/dist"
|
OUT="$SRC/dist"
|
||||||
DEST="$OUT/tabpark"
|
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"
|
rm -rf "$OUT"
|
||||||
mkdir -p "$DEST"
|
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"/
|
"$SRC"/options.html "$SRC"/options.js "$SRC"/options.css "$DEST"/
|
||||||
cp -r "$SRC"/icons "$DEST"/
|
cp -r "$SRC"/icons "$DEST"/
|
||||||
|
|
||||||
python3 - "$OUT" <<'PY'
|
python3 - "$OUT" "$XPI" <<'PY'
|
||||||
import os, sys, zipfile
|
import os, sys, zipfile
|
||||||
out = sys.argv[1]
|
src = os.path.join(sys.argv[1], 'tabpark')
|
||||||
src = os.path.join(out, 'tabpark')
|
xpi = sys.argv[2]
|
||||||
xpi = os.path.join(out, 'tabpark.xpi')
|
|
||||||
with zipfile.ZipFile(xpi, 'w', zipfile.ZIP_DEFLATED) as archive:
|
with zipfile.ZipFile(xpi, 'w', zipfile.ZIP_DEFLATED) as archive:
|
||||||
for root, _, files in os.walk(src):
|
for root, _, files in os.walk(src):
|
||||||
for filename in files:
|
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))
|
archive.write(full, os.path.relpath(full, src))
|
||||||
PY
|
PY
|
||||||
|
|
||||||
cat > "$OUT/README.md" <<'MD'
|
cat > "$OUT/README.md" <<MD
|
||||||
# Tab Park build
|
# Tab Park build
|
||||||
|
|
||||||
`tabpark/` is the unpacked extension. Load it with
|
\`tabpark/\` is the unpacked extension. Load it with
|
||||||
about:debugging#/runtime/this-firefox > Load Temporary Add-on > pick
|
about:debugging#/runtime/this-firefox > Load Temporary Add-on > pick
|
||||||
`tabpark/manifest.json`.
|
\`tabpark/manifest.json\`.
|
||||||
|
|
||||||
`tabpark.xpi` is the same files zipped, for handing to someone else or
|
\`tabpark-$VERSION-unsigned.xpi\` is the same files zipped, for uploading to
|
||||||
uploading to addons.mozilla.org.
|
addons.mozilla.org. It is unsigned; AMO signs it as part of submission.
|
||||||
MD
|
MD
|
||||||
|
|
||||||
echo "built $DEST and $OUT/tabpark.xpi"
|
echo "built $DEST and $XPI"
|
||||||
|
|||||||
Reference in New Issue
Block a user