зеркало из
1
0
Форкнуть 0

Use a manifest template to have different update URL for each xpi

This commit is contained in:
Julian Descottes 2018-09-14 12:05:15 +02:00
Родитель dac824a0c5
Коммит 8bec09e869
2 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -1,13 +1,20 @@
ARCHS=linux linux64 mac64 win32
MANIFEST=extension/manifest.json
VERSION=`grep -Eo '"version"\:\s*"[^"]+' $(MANIFEST) | grep -Eo '[0-9].*'`
ROOT_PATH=/pub/labs/fxos-simulator/adb-helper/
ROOT_UPDATE_URL=https://ftp.mozilla.org$(ROOT_PATH)
VERSION=1.0
define build-xpis
cd extension; \
for arch in $(ARCHS); do \
echo "build dist/$$arch-$(VERSION).xpi"; \
sed \
-e 's#@@UPDATE_URL@@#$(ROOT_UPDATE_URL)$$arch/updates.json#' \
-e 's#@@VERSION@@#$(VERSION)#' \
template-manifest.json > manifest.json; \
zip ../dist/$$arch-$(VERSION).xpi -r $$arch adb.json manifest.json; \
rm manifest.json; \
done
endef

Просмотреть файл

@ -2,13 +2,13 @@
"manifest_version": 2,
"name": "ADB binary provider",
"author": "Mozilla & Android Open Source Project",
"version": "1.0",
"version": "@@VERSION@@",
"description": "An extension providing adb blobs for connecting to Firefox for Android",
"applications": {
"gecko": {
"id": "adb@mozilla.org",
"strict_min_version": "63.0a1",
"update_url": "https://ftp.mozilla.org/pub/labs/fxos-simulator/adb-helper/updates.json"
"update_url": "@@UPDATE_URL@@"
}
},
"permissions": [