manifest/chrome.json now carries a fixed public key, so the extension id and the chrome.storage.local partition holding the wallet stay stable across checkout moves and re-clones instead of being derived from the absolute path. A release entrypoint produces a self-contained versioned artifact per browser, including the files that sit at dist/ root outside both browser directories. One version source of truth, enforced: the build fails naming the culprit when the two manifests and package.json disagree, and BUILD_COMMIT now marks a dirty tree as dirty. Firefox ships an unsigned XPI; the README states that release Firefox and ESR refuse it, that Developer Edition or Unbranded is required, and that Remove is irreversible except from the recovery phrase, which is asserted by test.
39 lines
1.3 KiB
Bash
Executable File
39 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# script/package: produce the release artifacts — one self-contained,
|
|
# versioned archive per browser — into release/. Our own extension to
|
|
# scripts-to-rule-them-all.
|
|
#
|
|
# It builds first, through `make build` rather than by calling build.js
|
|
# itself. That target is the only audited path to a release build: it creates
|
|
# the build receipt outside the repo, scrubs AUTISTMASK_DEBUG from the
|
|
# verifier's environment, tells script/verify-build in so many words to expect
|
|
# a RELEASE build, and re-runs script/check-censored against dist/.
|
|
# script/test-verify-build asserts that wiring by reading the recipe back out
|
|
# of `make -n`. Re-implementing that sequence here would give the release
|
|
# artifacts a second, unaudited path to dist/ — and it is the release
|
|
# artifacts, above everything else, that must never be built from a debug
|
|
# compile.
|
|
#
|
|
# This packages, it does not publish. Tagging, CRX packing and any upload are
|
|
# outward-facing acts and are nobody's job but the owner's.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
|
|
if ! command -v make >/dev/null 2>&1; then
|
|
echo "package: make is required (the release build runs through" \
|
|
"make build)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
make build
|
|
|
|
echo "Packaging release artifacts..."
|
|
node script/lib/package.js
|
|
}
|
|
|
|
main "$@"
|