Thunderbird/Betterbird add-on (Manifest V3): typing inside a quote splits the quote and inserts your own text with a marker such as [OH]:. - English and German user interface - Licensed under the Mozilla Public License 2.0 - English documentation, JSDoc lint gate, 87 tests (node:test + jsdom)
33 lines
1.1 KiB
Bash
Executable File
33 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright 2026 Oliver Herb
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
# Builds the add-on package: an XPI file (a ZIP archive of src/ plus LICENSE).
|
|
#
|
|
# Output: dist/inline-comment-<version>.xpi, where <version> is read from
|
|
# src/manifest.json. An existing file of the same name is replaced, and the
|
|
# path of the new file is printed on success.
|
|
#
|
|
# Usage: npm run build (runs the format check and the tests first)
|
|
# bash scripts/build.sh (packages only, without checks)
|
|
#
|
|
# Requires: bash, node and zip.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
VERSION="$(node -p "require('./src/manifest.json').version")"
|
|
OUT="dist/inline-comment-${VERSION}.xpi"
|
|
|
|
mkdir -p dist
|
|
rm -f "$OUT"
|
|
# Pack the contents of src/ so that manifest.json sits in the XPI root.
|
|
(cd src && zip -r -X -q "../$OUT" . -x '*.DS_Store' -x '*~')
|
|
# Ship the licence text in the XPI root next to manifest.json.
|
|
zip -X -q -j "$OUT" LICENSE
|
|
|
|
echo "$OUT"
|