docs: reproducible build steps with exact tool versions
This commit is contained in:
1 parent
9053327486
commit
c9524014fa
2 files changed
+39
-1
No files matched your search
@@ -43,6 +43,44 @@ Node).
|
||||
The `.xpi` is a plain ZIP of `src/` plus the `LICENSE` file. There is no bundler, no transpiler and
|
||||
no minification: every file from `src/` goes into the package unchanged.
|
||||
|
||||
## Reproducible build (for add-on reviewers)
|
||||
|
||||
Because the package contains no generated code, addons.thunderbird.net does not require a source
|
||||
archive. These steps are provided anyway, so anyone can rebuild a release and compare it.
|
||||
|
||||
**Environment used for release 0.2.0:** Debian GNU/Linux 13 (trixie), x86_64, Node.js 24.22.1,
|
||||
npm 11.19.1, Zip 3.0 (Info-ZIP), GNU bash 5.2.37. Any Linux or macOS works; on Windows use WSL.
|
||||
|
||||
**Install the tools:**
|
||||
|
||||
- Debian/Ubuntu (also inside WSL on Windows): `sudo apt install git zip`, then Node.js 22 or later
|
||||
from <https://nodejs.org/en/download> (or `sudo apt install nodejs npm` if the distribution ships
|
||||
Node.js 22 or later; check with `node --version`).
|
||||
- macOS: bash and zip are preinstalled; install git and Node.js 22 or later, e.g.
|
||||
`brew install git node`.
|
||||
|
||||
**Build:**
|
||||
|
||||
```bash
|
||||
git clone https://git.hassio-muc.de/Oliver_Herb/inline-comment.git
|
||||
cd inline-comment
|
||||
git checkout v0.2.0 # the tag of the release to rebuild
|
||||
bash scripts/build.sh # packs dist/inline-comment-0.2.0.xpi; needs only bash, zip and node
|
||||
```
|
||||
|
||||
`bash scripts/build.sh` is the complete build script: it reads the version from
|
||||
`src/manifest.json`, zips `src/` and adds `LICENSE`. No `npm install` is needed for it. To run all
|
||||
checks before packaging, use `npm ci && npm run build` instead (`npm ci` installs the exact
|
||||
development tool versions from `package-lock.json`).
|
||||
|
||||
**Compare with a published package** (the ZIP file itself differs because of file timestamps, the
|
||||
contents are identical):
|
||||
|
||||
```bash
|
||||
mkdir /tmp/xpi && unzip -q -d /tmp/xpi inline-comment-0.2.0.xpi
|
||||
diff -r -x LICENSE /tmp/xpi src && cmp /tmp/xpi/LICENSE LICENSE && echo identical
|
||||
```
|
||||
|
||||
## Repository layout
|
||||
|
||||
| Path | Content |
|
||||
|
||||
@@ -27,7 +27,7 @@ The comment is inserted with document.execCommand("insertHTML") so that the inse
|
||||
Code
|
||||
|
||||
- No remote code: all scripts are part of the package, nothing is loaded at runtime.
|
||||
- No minification, no transpiling, no bundler: the package is a plain ZIP of the src/ folder of the repository plus the LICENSE file (scripts/build.sh).
|
||||
- No minification, no transpiling, no bundler: the package is a plain ZIP of the src/ folder of the repository plus the LICENSE file (scripts/build.sh). Rebuild steps with the exact tool versions: .docs/guides/development.md, section "Reproducible build" (tag v0.2.0).
|
||||
- No third-party libraries in the package. Prettier, ESLint and jsdom are used only as development tools for formatting, linting and tests and are not shipped.
|
||||
|
||||
Linter: addons-linter reports MANIFEST_PERMISSIONS warnings for "compose" and "accountsRead". These are Thunderbird permissions unknown to the linter; the warnings are expected.
|
||||
Reference in new issue
Block a user