Ignore nested dependency directories in detection

This commit is contained in:
2026-09-08 19:56:51 +01:00
parent 3006020287
commit dd4ba9e081
+6 -5
View File
@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -euo pipefail
echo "================================" echo "================================"
@@ -6,18 +7,18 @@ echo " Davidson CI - Project Detection"
echo "================================" echo "================================"
PHP_COUNT=$(find . -type f -name "*.php" \ PHP_COUNT=$(find . -type f -name "*.php" \
-not -path "./vendor/*" | wc -l) -not -path "*/vendor/*" | wc -l)
JS_COUNT=$(find . -type f \ JS_COUNT=$(find . -type f \
\( -name "*.js" -o -name "*.mjs" -o -name "*.cjs" \) \ \( -name "*.js" -o -name "*.mjs" -o -name "*.cjs" \) \
-not -path "./node_modules/*" | wc -l) -not -path "*/node_modules/*" | wc -l)
TS_COUNT=$(find . -type f \ TS_COUNT=$(find . -type f \
\( -name "*.ts" -o -name "*.tsx" \) \ \( -name "*.ts" -o -name "*.tsx" \) \
-not -path "./node_modules/*" | wc -l) -not -path "*/node_modules/*" | wc -l)
CSS_COUNT=$(find . -type f -name "*.css" \ CSS_COUNT=$(find . -type f -name "*.css" \
-not -path "./node_modules/*" | wc -l) -not -path "*/node_modules/*" | wc -l)
echo echo
echo "Detected:" echo "Detected:"
@@ -33,4 +34,4 @@ echo
echo "DAVIDSON_JS_COUNT=$JS_COUNT" echo "DAVIDSON_JS_COUNT=$JS_COUNT"
echo "DAVIDSON_TS_COUNT=$TS_COUNT" echo "DAVIDSON_TS_COUNT=$TS_COUNT"
echo "DAVIDSON_CSS_COUNT=$CSS_COUNT" echo "DAVIDSON_CSS_COUNT=$CSS_COUNT"
} >> "${GITHUB_ENV:-/dev/null}" } >> "${GITHUB_ENV:-/dev/null}"