From e6dfff255ce57a53e5e6f33887819b7eda62eec0 Mon Sep 17 00:00:00 2001 From: yage Date: Sat, 11 Nov 2023 15:13:30 -0700 Subject: [PATCH] v3.7.3 ===================================================================== --- Changes ------------------------------ - Helm template generation looks for default values in file:// dependencies in addition to the standard values locations - vundle installer now *actually installs Vundle.vim* if it is missing --- zsh/lib/helm/validate.module.zsh | 23 +++++++++++++++++++++++ zsh/lib/system/vim/vundle.module.zsh | 2 +- zsh/system/vim/vundle/install | 6 +++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/zsh/lib/helm/validate.module.zsh b/zsh/lib/helm/validate.module.zsh index e9fc661..982b89d 100644 --- a/zsh/lib/helm/validate.module.zsh +++ b/zsh/lib/helm/validate.module.zsh @@ -54,6 +54,28 @@ _HELM__GET_CHART_ROOT() { } _HELM__GET_DEFAULT_VALUES_ARGS() { + for LOCAL_REPOSITORY in $(\ + cat "$CHART_ROOT/Chart.yaml" \ + | yq -r '.dependencies[] | .repository' \ + | grep '^file://' \ + | sed 's|file://||' \ + ) + do + [[ $LOCAL_REPOSITORY =~ ^[/~] ]] \ + && LOCAL_REPOSITORY_ROOT="$LOCAL_REPOSITORY" \ + || LOCAL_REPOSITORY_ROOT="$CHART_ROOT/$LOCAL_REPOSITORY" \ + ; + + for F in \ + "$LOCAL_REPOSITORY_ROOT/values.yaml" \ + "$LOCAL_REPOSITORY_ROOT/values.test.yaml" \ + "$LOCAL_REPOSITORY_ROOT/tests/default.yaml" \ + ; + do + [ -f "$F" ] && HELM_ARGS+=(--values "$F") + done + done + for F in \ "$CHART_ROOT/values.yaml" \ "$CHART_ROOT/values.test.yaml" \ @@ -63,3 +85,4 @@ _HELM__GET_DEFAULT_VALUES_ARGS() { [ -f "$F" ] && HELM_ARGS+=(--values "$F") done } + diff --git a/zsh/lib/system/vim/vundle.module.zsh b/zsh/lib/system/vim/vundle.module.zsh index e360a79..7f3ba51 100644 --- a/zsh/lib/system/vim/vundle.module.zsh +++ b/zsh/lib/system/vim/vundle.module.zsh @@ -20,7 +20,7 @@ VUNDLE__PLUGIN_LIST=$(ls $VUNDLE__PLUGIN_DIR | grep -v 'Vundle.vim' | grep -v 'b source $VUNDLE__BUILD_DEFINITIONS for PLUGIN in $(echo $VUNDLE__PLUGIN_LIST) do - typeset -f VUNDLE__BUILD__$PLUGIN >/dev/null 2>/dev/null || { + which VUNDLE__BUILD__$PLUGIN >/dev/null 2>/dev/null || { echo -e "\nVUNDLE__BUILD__$PLUGIN() {\n # ... build steps from $HOME/.vim/$PLUGIN \n}" \ >> $VUNDLE__BUILD_DEFINITIONS VUNDLE__BUILD__$PLUGIN() {} diff --git a/zsh/system/vim/vundle/install b/zsh/system/vim/vundle/install index 9a42a36..e022135 100755 --- a/zsh/system/vim/vundle/install +++ b/zsh/system/vim/vundle/install @@ -8,7 +8,11 @@ CHECK_ENVIRONMENT ##################################################################### PLUGIN_INSTALL() { - VUNDLE__PLUGIN_INSTALL || return 1 + [ -d "$HOME/.vim/bundle/Vundle.vim" ] || { + mkdir -p "$HOME/.vim/bundle/" + git clone https://github.com/VundleVim/Vundle.vim.git "$HOME/vim/budle/Vundle.vim" + } + VUNDLE__PLUGIN_INSTALL || return 1 VUNDLE__REBUILD_PLUGINS || return 2 }