AtlatestRepositorysigil-lsp

sigil-lsp / tree / testgate-h2-help-migration.sh

1#!/usr/bin/env bash
2set -euo pipefail
3repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
4cd "$repo_root"
5monorepo_source=${SIGIL_MONOREPO_SOURCE:?set SIGIL_MONOREPO_SOURCE to the P2 Sigil checkout}
6[[ -f "$monorepo_source/packages/sigil-help/package.sgl" ]] || {
7 printf 'FAIL: P2 monorepo does not provide sigil-help\n' >&2; exit 1; }
8rg -q -F 'url: "codeberg:sigil/sigil" package: "sigil-help"' package.sgl
9rg -q -F '(search-docs "_sigil_lsp_warmup_")' src/sigil/lsp/server.sgl || {
10 printf 'FAIL: LSP initialized notification no longer warms the help index\n' >&2; exit 1; }
11if rg -n '\(sigil docs([[:space:]]|\))|sigil-docs' src test README.md package.sgl sigil.lock \
12 -g '!gate-h2-help-migration.sh' -g '!**/transcripts/**'; then
13 printf 'FAIL: active LSP consumer still names old help package/namespace\n' >&2; exit 1
14fi
15sigil build --no-cache
16sigil test --report
17printf 'PASS: LSP hover/completion/definition resolve monorepo sigil-help metadata\n'