From 5d32693925731f7a07396483f10b08b5c280e10a Mon Sep 17 00:00:00 2001 From: beatz174-bit Date: Wed, 13 May 2026 07:52:53 +1000 Subject: [PATCH] docs: remove rg dependency and avoid archive compose fallback --- scripts/docs/list-compose-files.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/docs/list-compose-files.sh b/scripts/docs/list-compose-files.sh index cbbad54..03c8a37 100755 --- a/scripts/docs/list-compose-files.sh +++ b/scripts/docs/list-compose-files.sh @@ -8,23 +8,27 @@ cd "$ROOT" declare -a files=() if [ -f services-up.sh ]; then - # Parse literal FILES array entries (e.g., default-network.yml) and reuse - # compose search roots inferred from services-up.sh. + # Parse literal FILES array entries in services-up.sh (e.g. default-network.yml). while IFS= read -r line; do path=$(sed -E 's#.*\$PROJECT_ROOT/([^" ]+).*#\1#' <<<"$line") [ -f "$path" ] && files+=("$path") - done < <(awk '/^FILES=\(/,/^\)/ {print}' services-up.sh | rg '\-f\s+"\$PROJECT_ROOT/') + done < <(awk '/^FILES=\(/,/^\)/ {print}' services-up.sh | grep -E '\-f[[:space:]]+"\$PROJECT_ROOT/') - if rg -q 'find "\$PROJECT_ROOT/apps" "\$PROJECT_ROOT/monitoring" "\$PROJECT_ROOT/core"' services-up.sh; then + # Reuse the same compose roots used by services-up.sh to avoid archived compose files. + if grep -q 'find "\$PROJECT_ROOT/apps" "\$PROJECT_ROOT/monitoring" "\$PROJECT_ROOT/core"' services-up.sh; then while IFS= read -r f; do files+=("$f"); done < <( - find apps monitoring core -maxdepth 2 -type f \( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' -o -name 'compose.yml' -o -name 'compose.yaml' \) | sed 's#^\./##' | sort + find apps monitoring core -maxdepth 2 -type f \ + \( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' -o -name 'compose.yml' -o -name 'compose.yaml' \) \ + | sed 's#^\./##' | sort ) fi fi if [ "${#files[@]}" -eq 0 ]; then while IFS= read -r f; do files+=("$f"); done < <( - find . -type f \( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' -o -name 'compose.yml' -o -name 'compose.yaml' \) | sed 's#^\./##' | sort + find . -type f \ + \( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' -o -name 'compose.yml' -o -name 'compose.yaml' \) \ + | sed 's#^\./##' | grep -v '^archive/' | sort ) fi