Do not render images in example dir

This commit is contained in:
Daniel Berteaud 2024-01-05 10:46:03 +01:00
parent 52acc19da2
commit 8bfc6c6c3e
1 changed files with 1 additions and 2 deletions

3
ctctl
View File

@ -617,7 +617,7 @@ ctctl_render_templates(){
# Now render the bundle files
gomplate "${GOMPLATE_COMMON_ARGS[@]}" "${GOMPLATE_BUNDLE_ARGS[@]}" "${GOMPLATE_OUT_ARGS[@]}"
for IMGDIR in $(find . -name images -type d); do
for IMGDIR in $(find . -name images -type d | grep -vE '^./bundles/.+/example'); do
for DOCKER_IMAGE in $(find ${IMGDIR} -mindepth 1 -maxdepth 1 -type d); do
echo "Redering Docker image $(basename ${DOCKER_IMAGE})"
gomplate "${GOMPLATE_COMMON_ARGS[@]}" --input-dir ${DOCKER_IMAGE} --exclude resources/** --exclude root/** --output-dir output/images/$(basename ${DOCKER_IMAGE})/
@ -672,7 +672,6 @@ ctctl_render_templates(){
if [ -d "bundles/${NAME}/images" ]; then
for DOCKER_IMAGE in $(find bundles/${NAME}/images -mindepth 1 -maxdepth 1 -type d); do
echo "Redering example Docker image $(basename ${DOCKER_IMAGE})"
gomplate "${GOMPLATE_COMMON_ARGS[@]}" --input-dir ${DOCKER_IMAGE} --exclude resources/** --exclude root/** --output-dir bundles/${NAME}/example/images/$(basename ${DOCKER_IMAGE})/
for ROOT in resources root; do
if [ -d "${DOCKER_IMAGE}/${ROOT}" ]; then