diff --git a/modules/detect.sh b/modules/detect.sh index b74c432..7891813 100755 --- a/modules/detect.sh +++ b/modules/detect.sh @@ -1,4 +1,5 @@ #!/bin/bash + set -euo pipefail echo "================================" @@ -6,18 +7,18 @@ echo " Davidson CI - Project Detection" echo "================================" PHP_COUNT=$(find . -type f -name "*.php" \ - -not -path "./vendor/*" | wc -l) + -not -path "*/vendor/*" | wc -l) JS_COUNT=$(find . -type f \ \( -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 \ \( -name "*.ts" -o -name "*.tsx" \) \ - -not -path "./node_modules/*" | wc -l) + -not -path "*/node_modules/*" | wc -l) CSS_COUNT=$(find . -type f -name "*.css" \ - -not -path "./node_modules/*" | wc -l) + -not -path "*/node_modules/*" | wc -l) echo echo "Detected:" @@ -33,4 +34,4 @@ echo echo "DAVIDSON_JS_COUNT=$JS_COUNT" echo "DAVIDSON_TS_COUNT=$TS_COUNT" echo "DAVIDSON_CSS_COUNT=$CSS_COUNT" -} >> "${GITHUB_ENV:-/dev/null}" +} >> "${GITHUB_ENV:-/dev/null}" \ No newline at end of file