Speed up the distribution of self-hosted Firefox webextensions
- provides a lightweight web service to serve your JSON update manifest ;
- ease the usage of
web-ext
via a simple docker image to sign your webextension on AMO
This tool relies on docker
and docker-compose
.
See https://docs.docker.com/compose/install/
Some shortcuts are provided by a Makefile
.
You will need make
to use them, but the tool is not mandatory.
- navigate to your webextension's project directory
cd /home/<username>/dev/webextension
- move all sources to a new subdirectory
src
. If you already used theweb-ext
npm package in this directory before you should also move your add-on id file.
mkdir src
mv !(src) src
[ -f .web-extension-id ] && mv .web-extension-id src
- clone this repository as a submodule of the webextension
git submodule add [email protected]:alexandre-abrioux/webextension-helper.git helper
- copy
helper/.env.dist
tohelper/.env
and fill in your Mozilla API credentials. You can find all the available options on the web-ext reference page.
cp helper/.env.dist helper/.env
vim helper/.env
Simply run make sign
.
To rebuild the web-ext
docker image you can run make update
.
- configure your webextension's manifest file to target the
update.php
script
"applications": {
"gecko": {
"update_url": "https://webextension-helper.example.com/updates.php"
}
}
- use the
docker-compose.yml
file to start the web service on your server
make up
Some shortcuts are configured in a Makefile
. Use make help
for more information.
make help
make build
make up
make stop
make down
make restart
make sign
make update