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.
6 lines
192 B
Bash
6 lines
192 B
Bash
#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:-}\""
|