Skip to content

Commit

Permalink
v3.7.7
Browse files Browse the repository at this point in the history
=====================================================================

--- New Features -------------------------

- GitHub Actions now autodetects groups within the "$GITHUB_WORKSPACE"
  • Loading branch information
wrynegade committed Nov 13, 2023
1 parent 4a12089 commit 6cc10e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ There are a few notable changes to this runtime:
- Other user input will default to an empty string
- Logs will not be captured
- Setting the environment variable `SCWRYPTS_GROUP_LOADER__[a-z_]\+` will source the file indicated in the variable (this allows custom groups without needing to modify the `config.zsh` directly)
- In GitHub actions, `*.scwrypts.zsh` groups are detected automatically from the `$GITHUB_WORKSPACE`; set `SCWRYPTS_GITHUB_NO_AUTOLOAD=true` to disable


## Contributing
Expand Down
13 changes: 13 additions & 0 deletions zsh/lib/config.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ do
[ -f "$GROUP_LOADER" ] && source "$GROUP_LOADER"
done

: \
&& [ ! "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] \
&& [ $GITHUB_WORKSPACE ] \
&& [ ! $SCWRYPTS_GITHUB_NO_AUTOLOAD ] \
&& SCWRYPTS_AUTODETECT_GROUP_BASEDIR="$GITHUB_WORKSPACE"

[ "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] && [ -d "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" ] && {
for GROUP_LOADER in $(find "$SCWRYPTS_AUTODETECT_GROUP_BASEDIR" -type f -name \*scwrypts.zsh)
do
[ -f "$GROUP_LOADER" ] && source "$GROUP_LOADER"
done
}

#####################################################################
[ $NO_EXPORT_CONFIG ] || __SCWRYPT=1 # arbitrary; indicates currently inside a scwrypt
true

0 comments on commit 6cc10e3

Please sign in to comment.