Skip to content

Build Process

Eric Bixby edited this page Sep 11, 2022 · 35 revisions

Operating System

It is primarily built on Ubuntu. It also builds on macOS and Windows.

Install NodeJS

Install NodeJS version 12.22.12 (npm version 6.14.16). Use nvm to install a particular node version.

Source Folder Location

Because the build output will contain relative paths in some files, when building for verification/reproducibility purposes, the source code folder needs to be at the same folder level as the original build (the names don't need to match, just the folder levels).

If using the downloaded source code: ~/Downloads/auto-sort-bookmarks-webext-X.Y.Z/ (where X.Y.Z is the version number)

If using the cloned repo: ~/git/auto-sort-bookmarks-webext/

Install web-ext

Install web-ext:

npm i -g web-ext@6.8.0

More information: web-ext

Install weh

Install weh:

npm i -g gulp@4.0.2
npm i -g weh@2.10.0

Override dependencies with the same version used for the submitted source rather than the latest:

cd `npm root -g`/weh
cp ~/Downloads/auto-sort-bookmarks-webext-X.Y.Z/weh-npm-shrinkwrap.json ./npm-shrinkwrap.json
npm i

More information: weh (weh depends on NodeJS 12.X; newer versions not supported)

Build

The following script will build/generate the target Javascript code and bundle it into a .xpi file:

cd ~/Downloads/auto-sort-bookmarks-webext-X.Y.Z
./build_ff.sh

The only difference between the submitted and generated sources should be the "build.date" file.