let a stack compute its settings without make

A stack can now ship <name>.env and <name>.sh next to its compose files. The
hook is sourced with the tag helpers available, which is what the computing
.mk files of the catalogue were using make for: 29 of its 44 .mk files only
exist to build variables like the fabio tags.

Converting stack/host/fabio.mk by hand gives byte-identical output for the
route tag, and drops a trailing comma the make version left in the listener
list.

Also: APP_HOST and APP_URI are computed (the tag helpers build on them),
--color controls the escape codes rather than always emitting them, and
make test-portability runs the CLI under busybox ash and dash.
This commit is contained in:
Yann Autissier
2026-09-03 20:22:52 +02:00
parent 234739e531
commit f541ca418b
13 changed files with 281 additions and 22 deletions
+5
View File
@@ -0,0 +1,5 @@
#shellcheck shell=sh
# Helper: hooks set variables in the caller's scope, which a subshell loses.
[ -n "${4:-}" ] && eval "$3=\$4"
myos_stack_hooks "$1" "$2"
eval "printf '%s\n' \"\${$3:-}\""