Fix large file detection for BusyBox find
Replace -size +1M with du-based approach since BusyBox find doesn't support size suffixes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d36a46bae8
commit
7cea33f56d
1 changed files with 4 additions and 2 deletions
|
@ -78,13 +78,15 @@ jobs:
|
||||||
- name: Check for large files
|
- name: Check for large files
|
||||||
run: |
|
run: |
|
||||||
echo "Checking for large files..."
|
echo "Checking for large files..."
|
||||||
LARGE_FILES=$(find . -type f -size +1M \
|
# Use du to find files larger than 1MB (1024KB)
|
||||||
|
LARGE_FILES=$(find . -type f \
|
||||||
-not -path "./node_modules/*" \
|
-not -path "./node_modules/*" \
|
||||||
-not -path "./.git/*" \
|
-not -path "./.git/*" \
|
||||||
-not -path "./dist/*" \
|
-not -path "./dist/*" \
|
||||||
-not -path "./coverage/*" \
|
-not -path "./coverage/*" \
|
||||||
-not -name "*.db" \
|
-not -name "*.db" \
|
||||||
-not -name "package-lock.json")
|
-not -name "package-lock.json" \
|
||||||
|
-exec sh -c 'size=$(du -k "$1" 2>/dev/null | cut -f1); [ "$size" -gt 1024 ] && echo "$1"' _ {} \;)
|
||||||
|
|
||||||
if [ -n "$LARGE_FILES" ]; then
|
if [ -n "$LARGE_FILES" ]; then
|
||||||
echo "⚠️ Found large files (>1MB):"
|
echo "⚠️ Found large files (>1MB):"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue