From 91780024f09b5f19ad4f3b548126af3a06661788 Mon Sep 17 00:00:00 2001 From: yage Date: Mon, 13 Nov 2023 12:20:08 -0700 Subject: [PATCH] v3.7.5 ===================================================================== --- New Features ------------------------- - adding variables of the format `^SCWRYPTS_GROUP_LOADERS__[a-z_]\+=` will let those files be explicitly sourced during run (this should allow custom group usage in CI) --- action.yaml | 3 +-- run | 1 + zsh/lib/config.zsh | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/action.yaml b/action.yaml index 28ec34d..f57b067 100644 --- a/action.yaml +++ b/action.yaml @@ -55,8 +55,7 @@ runs: --name scwrypts/virtualenv/update-all \ --group scwrypts \ --type zsh \ - ; - #> $HOME/.scwrypts.virtualenv.log 2>&1 + > $HOME/.scwrypts.virtualenv.log 2>&1 echo "CI_SCWRYPTS_READY=1" >> $GITHUB_ENV exit 0 diff --git a/run b/run index b9b11ca..a851bb3 100755 --- a/run +++ b/run @@ -218,6 +218,7 @@ __RUN() { [[ $ENV_REQUIRED -eq 1 ]] && { [ ! $ENV_NAME ] && ENV_NAME=$(SCWRYPTS__SELECT_ENV) + for GROUP in ${SCWRYPTS_GROUPS[@]} do local ENV_FILE=$(SCWRYPTS__GET_ENV_FILE "$ENV_NAME" "$GROUP") diff --git a/zsh/lib/config.zsh b/zsh/lib/config.zsh index d683a12..3126d61 100644 --- a/zsh/lib/config.zsh +++ b/zsh/lib/config.zsh @@ -47,6 +47,13 @@ do } done +##################################################################### + +for GROUP_LOADER in $(env | sed -n 's/^SCWRYPTS_GROUP_LOADER__[a-z_]\+=//p') +do + [ -f "$GROUP_LOADER" ] && source "$GROUP_LOADER" +done + ##################################################################### [ $NO_EXPORT_CONFIG ] || __SCWRYPT=1 # arbitrary; indicates currently inside a scwrypt true