Ignore vim swp files and do not render -conf bundles

This commit is contained in:
Daniel Berteaud 2024-02-04 13:55:00 +01:00
parent 5d2d569ca0
commit c5dd40bc14
1 changed files with 6 additions and 1 deletions

7
ctctl
View File

@ -539,6 +539,11 @@ ctctl_render_templates(){
local BRANCH=$(echo ${BUNDLE} | jq -r .branch)
local NAME=$(basename ${URL} .git)
# Nothing to render for bundles ending with -conf as they only provides configuration
if echo ${NAME} | grep -qE '\-conf$'; then
continue
fi
if [ "${BRANCH}" = "null" ]; then
BRANCH=master
fi
@ -581,7 +586,7 @@ ctctl_render_templates(){
local GOMPLATE_BUNDLE_ARGS=(--input-dir "bundles/${NAME}")
# Do not render templates from dependencies, variables files, optional files directory content and images (images will be handled later)
GOMPLATE_BUNDLE_ARGS+=(--exclude .git* --exclude deps/** --exclude bundles.yml --exclude variables.yml --exclude images/** --exclude templates/** --exclude files/** --exclude example/**)
GOMPLATE_BUNDLE_ARGS+=(--exclude .git* --exclude **.swp --exclude bundles.yml --exclude variables.yml --exclude images/** --exclude templates/** --exclude files/** --exclude example/**)
# Now, render the merged config in a temp file