Add `lpRegen` (scripts/webui/webui_regen.sh) — one entry point that rebuilds the
file-derived artifacts whose sources changed, so callers don't have to know which
generator owns what. Self-heal is a cheap `find -newer` mtime compare (no watcher
/ daemon): a stage runs only when a source is newer than its artifact, or --force.
- `libreportal regen [all|webui|arrays] [--force]` CLI command (new category).
- Task processor idle tick runs a throttled `regen webui` poll, so an app dropped
in out-of-band (drag-drop / marketplace) appears on its own — no manual command,
no inotify (works on the relocatable/external-drive roots where inotify can't).
- make_release.sh guards against shipping stale source arrays (regenerate; abort
if the committed tree was out of date), killing the "forgot generate_arrays" bug
class at the build boundary.
- Document the front door in DEVELOPMENT.md.
webui scope rebuilds from containers/<app>/{*.config,tools/*.tools.json}; arrays
scope from scripts/** (a dev/build concern — a no-op on a normal install). Gate
logic verified in a sandbox (clean/config-newer/tools-newer/force/missing).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
27 lines
1.2 KiB
Bash
27 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# Regen Commands Header
|
|
# Shows available regen commands and help information
|
|
|
|
cliShowRegenHelp()
|
|
{
|
|
echo ""
|
|
echo "Available Regen Commands:"
|
|
echo ""
|
|
echo " libreportal regen [scope] [--force] - Rebuild generated data whose sources changed"
|
|
echo " all - webui + arrays (default)"
|
|
echo " webui - apps.json / apps-tools.json from container configs"
|
|
echo " arrays - the static source arrays from scripts/** (dev)"
|
|
echo " --force - rebuild even if nothing looks stale"
|
|
echo ""
|
|
echo "Self-heal: each scope only rebuilds when a source file is newer than its"
|
|
echo "generated artifact, so it is cheap to run any time. The task processor also"
|
|
echo "runs 'regen webui' periodically, so a dropped-in app appears on its own."
|
|
echo ""
|
|
echo "Examples:"
|
|
echo " libreportal regen - rebuild anything stale"
|
|
echo " libreportal regen webui - just the WebUI data"
|
|
echo " libreportal regen --force - force a full rebuild"
|
|
echo ""
|
|
}
|