Fix grep commands for BusyBox compatibility
Replace GNU grep --include/--exclude-dir options with find + xargs pattern for BusyBox grep compatibility on self-hosted runners. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
136ef29bd2
commit
d36a46bae8
2 changed files with 4 additions and 9 deletions
|
@ -138,10 +138,10 @@ jobs:
|
||||||
- name: Check for secrets
|
- name: Check for secrets
|
||||||
run: |
|
run: |
|
||||||
echo "Checking for potential secrets..."
|
echo "Checking for potential secrets..."
|
||||||
! grep -r "MAPBOX_ACCESS_TOKEN" --include="*.js" --include="*.ts" --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git . || \
|
! find . -name "*.js" -o -name "*.ts" | grep -v node_modules | grep -v dist | grep -v .git | xargs grep -l "MAPBOX_ACCESS_TOKEN" || \
|
||||||
(echo "❌ Found hardcoded Mapbox token!" && exit 1)
|
(echo "❌ Found hardcoded Mapbox token!" && exit 1)
|
||||||
|
|
||||||
! grep -r "ADMIN_PASSWORD" --include="*.js" --include="*.ts" --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git . || \
|
! find . -name "*.js" -o -name "*.ts" | grep -v node_modules | grep -v dist | grep -v .git | xargs grep -l "ADMIN_PASSWORD" || \
|
||||||
(echo "❌ Found hardcoded admin password!" && exit 1)
|
(echo "❌ Found hardcoded admin password!" && exit 1)
|
||||||
|
|
||||||
echo "✅ No hardcoded secrets found"
|
echo "✅ No hardcoded secrets found"
|
||||||
|
|
|
@ -52,10 +52,7 @@ jobs:
|
||||||
- name: Check for console.log statements
|
- name: Check for console.log statements
|
||||||
run: |
|
run: |
|
||||||
echo "Checking for console.log statements..."
|
echo "Checking for console.log statements..."
|
||||||
FILES=$(grep -r "console\.log" --include="*.ts" --include="*.js" \
|
FILES=$(find src/ -name "*.ts" -o -name "*.js" | xargs grep -l "console\.log" || true)
|
||||||
--exclude-dir=node_modules --exclude-dir=dist --exclude-dir=public/dist \
|
|
||||||
--exclude-dir=tests --exclude-dir=scripts \
|
|
||||||
src/ || true)
|
|
||||||
|
|
||||||
if [ -n "$FILES" ]; then
|
if [ -n "$FILES" ]; then
|
||||||
echo "⚠️ Found console.log statements (consider using proper logging):"
|
echo "⚠️ Found console.log statements (consider using proper logging):"
|
||||||
|
@ -67,9 +64,7 @@ jobs:
|
||||||
- name: Check for TODO/FIXME comments
|
- name: Check for TODO/FIXME comments
|
||||||
run: |
|
run: |
|
||||||
echo "Checking for TODO/FIXME comments..."
|
echo "Checking for TODO/FIXME comments..."
|
||||||
TODOS=$(grep -r "TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.js" \
|
TODOS=$(find . -name "*.ts" -o -name "*.js" | grep -v node_modules | grep -v dist | xargs grep -l "TODO\|FIXME\|HACK\|XXX" || true)
|
||||||
--exclude-dir=node_modules --exclude-dir=dist \
|
|
||||||
. || true)
|
|
||||||
|
|
||||||
if [ -n "$TODOS" ]; then
|
if [ -n "$TODOS" ]; then
|
||||||
echo "📝 Found TODO/FIXME comments:"
|
echo "📝 Found TODO/FIXME comments:"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue