build: Melos, a Dart check and every path for the single repository

- Melos 8.9 as the root's dev dependency, with scripts across the
  workspace (analyze, test:dart, test:flutter, generate, check) and its
  filters (--diff, --include-dependents); cli_util overridden to 0.5.2
  for it, since Learn's flutter_launcher_icons asks for 0.4 and uses only
  its logger, unchanged in 0.5.
- tool/check.dart in place of tool/check.sh: packages, formatting of our
  own files, analysis, the tools' tests, then every package's tests
  through Melos (--changed-since=<commit> for only what changed and what
  depends on it). tool/pre-push is the hook: the signature check, then
  the checks. CI generates every server's code and runs the same check.
- The images build from the root with a workspace narrowed to what they
  need (tool/workspace_only.sh); compose, the deploy's migration test,
  the snap, the release script, the editor's launch files and Learn's
  asset tools (run from apps/learn) follow the new layout.
- The project's source is named as project-halkyon/halkyon (source link,
  snap, F-Droid listing, release uploads); the AGPL packages carry the
  licence's own text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-19 20:39:09 +02:00
commit af1dbee509
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -3,7 +3,7 @@
# repository root (the build context), where the workspace's root pubspec and lockfile
# live:
#
# docker build -f halkyon_learn_curator/Dockerfile .
# docker build -f apps/learn/halkyon_learn_curator/Dockerfile .
#
# A container of its own beside the server (deploy/compose.yaml, decided 2026-10-09):
# the curator (AGPL) never enters the server's image or process, and a conversion
@ -13,17 +13,14 @@
FROM dart:3.13.4 AS build
WORKDIR /app
COPY pubspec.yaml pubspec.lock ./
COPY halkyon_learn_curator halkyon_learn_curator
COPY tool/workspace_only.sh tool/
COPY apps/learn/halkyon_learn_curator apps/learn/halkyon_learn_curator
# The workspace root with only the curator package, as the server's Dockerfile does it
# with the server's. The check fails the build loudly if the member list changes shape.
RUN sed -i -e '/^ - halkyon_learn_client$/d' -e '/^ - halkyon_learn_flutter$/d' \
-e '/^ - halkyon_learn_server$/d' pubspec.yaml \
&& grep -q '^ - halkyon_learn_curator$' pubspec.yaml \
&& ! grep -q -e 'halkyon_learn_client' -e 'halkyon_learn_flutter' \
-e 'halkyon_learn_server' pubspec.yaml
# with the server's.
RUN sh tool/workspace_only.sh apps/learn/halkyon_learn_curator
RUN dart pub get
WORKDIR /app/halkyon_learn_curator
WORKDIR /app/apps/learn/halkyon_learn_curator
RUN dart build cli --target bin/curate.dart --output build
# ── Runtime stage ─────────────────────────────────────────────────────────────────
@ -38,8 +35,8 @@ RUN apt-get update \
&& rm -rf /usr/share/mecab/dic/ipadic /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/halkyon_learn_curator/build/bundle/ ./
COPY --from=build /app/halkyon_learn_curator/data/ data/
COPY --from=build /app/apps/learn/halkyon_learn_curator/build/bundle/ ./
COPY --from=build /app/apps/learn/halkyon_learn_curator/data/ data/
# An unprivileged user of its own: user ID 10001, shared with neither the containers
# of PostgreSQL and the server (999) nor the CI runner on the host (61000). The folder