yage
6f42c9cb16
===================================================================== --- New Features ------------------------- - Github Actions integration from 3.7.0 and up! ```yaml # try it out in gh actions - uses: wrynegade/scwrypts@main with: version: v3.7.0 scwrypt: --name hello-world --group scwrypts --type py args: --message "hello from github actions ci <3" ``` --- New Scripts -------------------------- zsh/helm ) smart helm template functions (simply pass a filename) - get-template - update-dependencies --- Changes ------------------------------ - CHECK_ENVIRONMENT now uses proper argument parsing - scwrypts/plugins loaded by setting in config or environment: SCWRYPTS_PLUGIN_ENABLED__plugin=1 - SCWRYPTS__GET_PATH_TO_RELATIVE_ARGUMENT was missed in the v2->v3 refactor and has now been reincluded as SCWRYPTS__GET_REALPATH
53 lines
1.7 KiB
Bash
53 lines
1.7 KiB
Bash
[[ $__SCWRYPT -eq 1 ]] && return 0
|
|
#####################################################################
|
|
|
|
[ ! $SCWRYPTS_ROOT ] \
|
|
&& SCWRYPTS_ROOT="$(cd $(dirname "${0:a:h}"); git rev-parse --show-toplevel)"
|
|
|
|
#####################################################################
|
|
|
|
DEFAULT_CONFIG="$SCWRYPTS_ROOT/zsh/lib/config.user.zsh"
|
|
source "$DEFAULT_CONFIG"
|
|
|
|
USER_CONFIG_OVERRIDES="$SCWRYPTS_CONFIG_PATH/config.zsh"
|
|
[ ! -f "$USER_CONFIG_OVERRIDES" ] && {
|
|
mkdir -p $(dirname "$USER_CONFIG_OVERRIDES")
|
|
cp "$DEFAULT_CONFIG" "$USER_CONFIG_OVERRIDES"
|
|
}
|
|
source "$USER_CONFIG_OVERRIDES"
|
|
|
|
[ ! -d $SCWRYPTS_CONFIG_PATH ] && mkdir -p $SCWRYPTS_CONFIG_PATH
|
|
[ ! -d $SCWRYPTS_DATA_PATH ] && mkdir -p $SCWRYPTS_DATA_PATH
|
|
[ ! -d $SCWRYPTS_ENV_PATH ] && mkdir -p $SCWRYPTS_ENV_PATH
|
|
[ ! -d $SCWRYPTS_LOG_PATH ] && mkdir -p $SCWRYPTS_LOG_PATH
|
|
[ ! -d $SCWRYPTS_OUTPUT_PATH ] && mkdir -p $SCWRYPTS_OUTPUT_PATH
|
|
|
|
export \
|
|
SCWRYPTS_GROUPS \
|
|
SCWRYPTS_CONFIG_PATH \
|
|
SCWRYPTS_DATA_PATH \
|
|
SCWRYPTS_SHORTCUT \
|
|
SCWRYPTS_ENV_SHORTCUT \
|
|
SCWRYPTS_LOG_PATH \
|
|
SCWRYPTS_OUTPUT_PATH \
|
|
;
|
|
|
|
SCWRYPTS_GROUPS+=(scwrypts) # 'scwrypts' group is required!
|
|
SCWRYPTS_GROUPS=($(echo $SCWRYPTS_GROUPS | sed 's/\s\+/\n/g' | sort -u))
|
|
|
|
source "$SCWRYPTS_ROOT/zsh/lib/config.group.zsh" \
|
|
|| FAIL 69 'failed to set up scwrypts group; aborting'
|
|
|
|
#####################################################################
|
|
|
|
for plugin in $(ls $SCWRYPTS_ROOT__scwrypts/plugins)
|
|
do
|
|
[[ $(eval 'echo $SCWRYPTS_PLUGIN_ENABLED__'$plugin) -eq 1 ]] && {
|
|
source "$SCWRYPTS_ROOT/plugins/$plugin/$plugin.scwrypts.zsh"
|
|
}
|
|
done
|
|
|
|
#####################################################################
|
|
[ $NO_EXPORT_CONFIG ] || __SCWRYPT=1 # arbitrary; indicates currently inside a scwrypt
|
|
true
|