Files
splirate/scripts/sign-firefox.sh
2026-08-05 23:31:00 -05:00

26 lines
663 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
DIST_DIR="${ROOT_DIR}/dist/signed"
if [[ -z "${AMO_JWT_ISSUER:-}" || -z "${AMO_JWT_SECRET:-}" ]]; then
echo "Missing AMO credentials." >&2
echo "Set AMO_JWT_ISSUER and AMO_JWT_SECRET before running this script." >&2
exit 1
fi
mkdir -p "${DIST_DIR}"
cd "${ROOT_DIR}"
# Signs as an unlisted add-on (private distribution).
npx web-ext sign \
--source-dir "${ROOT_DIR}" \
--artifacts-dir "${DIST_DIR}" \
--channel unlisted \
--ignore-files "dist/*" "scripts/*" ".git/*" "*.har" "*.log" "*.tmp"
echo "Signed XPI artifacts are in:"
echo "${DIST_DIR}"