make the hooks usable by the whole catalogue
- hooks load the _stack files of every directory between the stack path root and the stack, outermost first: make included both $(dir)/*.mk and $(dir)/*/*.mk, so a stack in a subdirectory saw its parent's settings - a group may be declared in <group>/<group>.env, where the stack lives - MYOS_STACK_DIR lets a hook read a file it ships next to itself - myos_filter no longer confuses a literal * in a make pattern with a wildcard, and the list helpers no longer let the shell expand a * into filenames - MACHINE, SYSTEM, HOST and DOMAINNAME join the framework variables a hook sees - the make shim gains $(call myos-var,NAME), so a .mk target can read a setting that now lives in a hook, and it picks up the .mk of every stack directory rather than only the project's
This commit is contained in:
@@ -55,6 +55,11 @@ myos_context_defaults() {
|
||||
myos_default_DOCKER_NETWORK() { myos_network_private "$USER" "$ENV"; }
|
||||
myos_default_DOCKER_IMAGE_TAG() { printf 'latest'; }
|
||||
myos_default_GIT_USER() { printf '%s' "$USER"; }
|
||||
myos_default_HOST() { myos_addprefix "${HOSTNAME:-}." "$(myos_var DOMAIN)"; }
|
||||
myos_default_HOSTNAME() { printf '%s' "${HOSTNAME:-}"; }
|
||||
myos_default_DOMAINNAME() { myos_firstword "$(myos_var DOMAIN)"; }
|
||||
myos_default_MACHINE() { uname -m 2>/dev/null; }
|
||||
myos_default_SYSTEM() { uname -s 2>/dev/null; }
|
||||
myos_default_HOST_COMPOSE_PROJECT_NAME() { printf '%s' "${HOSTNAME:-}"; }
|
||||
myos_default_HOST_DOCKER_VOLUME() { printf '%s' "${HOSTNAME:-}"; }
|
||||
myos_default_HOST_DOCKER_REPOSITORY() { printf '%s' "${HOSTNAME:-}" | tr '_-' '//'; }
|
||||
|
||||
Reference in New Issue
Block a user