port the make list functions and JWT, and expose the framework variables to hooks

lib/str.sh gains firstword, lastword, or, patsubst, filter, filter_out,
addprefix, addsuffix and jwt: what the catalogue .mk files are written in.
The make JWT macro split on the commas of its payload; this one does not.

lib/context.sh registers COMPOSE_PROJECT_NAME, APP, DOCKER_NETWORK_* and the
rest as lazy defaults, so a converted .mk keeps reading them as it did.

Hooks also load a directory-level _stack.env and _stack.sh, for the .mk files
of the catalogue that hold settings for several stacks at once.
This commit is contained in:
Yann Autissier
2026-09-03 21:58:22 +02:00
parent 3e55cdcd14
commit 6192d73cbe
8 changed files with 199 additions and 36 deletions
+2
View File
@@ -39,6 +39,8 @@ myos_normalize() {
-e 's/^APPS .*/APPS @APPS@/' \
-e 's/^BRANCH .*/BRANCH @BRANCH@/' \
-e 's/^VERSION .*/VERSION @VERSION@/' \
-e 's/--build-arg VERSION=[^ ]*/--build-arg VERSION=@VERSION@/' \
-e 's/--build-arg BRANCH=[^ ]*/--build-arg BRANCH=@BRANCH@/' \
-e 's/[[:space:]][[:space:]]*/ /g' \
-e 's/[[:space:]]*$//'
}