v3.7.0
===================================================================== --- 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
This commit is contained in:
@ -155,6 +155,18 @@ yN() {
|
||||
[[ $yN =~ [yY] ]] && return 0 || return 1
|
||||
}
|
||||
|
||||
CAPTURE() {
|
||||
[ ! $USAGE ] && USAGE="
|
||||
usage: stdout-varname stderr-varname [...cmd and args...]
|
||||
|
||||
captures stdout and stderr on separate variables for a command
|
||||
"
|
||||
{
|
||||
IFS=$'\n' read -r -d '' $2;
|
||||
IFS=$'\n' read -r -d '' $1;
|
||||
} < <((printf '\0%s\0' "$(${@:3})" 1>&2) 2>&1)
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
||||
GETSUDO() {
|
||||
|
@ -19,10 +19,16 @@ source ${0:a:h}/environment.zsh
|
||||
|
||||
CHECK_ENVIRONMENT() {
|
||||
local OPTIONAL=0
|
||||
[[ $1 =~ --optional ]] && OPTIONAL=1
|
||||
|
||||
[[ $OPTIONAL -eq 1 ]] \
|
||||
&& E=WARNING || E=ERROR
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case $1 in
|
||||
--optional ) OPTIONAL=1 ;;
|
||||
esac
|
||||
shift 1
|
||||
done
|
||||
|
||||
[[ $OPTIONAL -eq 1 ]] && E=WARNING || E=ERROR
|
||||
|
||||
local ENVIRONMENT_STATUS=0
|
||||
|
||||
|
Reference in New Issue
Block a user