1#!/bin/bash
2
3# Script to verify that .gitignore is working correctly
4
5echo "๐งน Verifying .gitignore configuration for Shelley"
6echo "================================================"
7
8cd "$(dirname "$0")/../.."
9
10echo "\nโ
Current git status:"
11git status --porcelain
12
13if [ $? -eq 0 ] && [ -z "$(git status --porcelain)" ]; then
14 echo "โ
Working tree is clean"
15else
16 echo "โ ๏ธ Working tree has changes"
17fi
18
19echo "\n๐ซ Files being ignored by git:"
20git status --ignored --porcelain | grep '^!!' | head -10
21
22echo "\n๐ Build directories that should be ignored:"
23for dir in "ui/node_modules" "ui/dist" "ui/test-results" "ui/playwright-report" "bin"; do
24 if [ -d "$dir" ]; then
25 echo " โ
$dir (exists and ignored)"
26 else
27 echo " โช $dir (doesn't exist)"
28 fi
29done
30
31echo "\n๐พ Database files that should be ignored:"
32for pattern in "*.db" "*.db-shm" "*.db-wal"; do
33 files=$(find . -maxdepth 2 -name "$pattern" 2>/dev/null)
34 if [ -n "$files" ]; then
35 echo " โ
Found and ignoring: $pattern"
36 echo "$files" | sed 's/^/ /'
37 else
38 echo " โช No $pattern files found"
39 fi
40done
41
42echo "\n๐ญ Playwright outputs that should be ignored:"
43for dir in "ui/test-results" "ui/playwright-report"; do
44 if [ -d "$dir" ]; then
45 echo " โ
$dir (exists and ignored)"
46 else
47 echo " โช $dir (doesn't exist)"
48 fi
49done
50
51echo "\n๐ธ Screenshot directory:"
52if [ -d "ui/e2e/screenshots" ]; then
53 count=$(find ui/e2e/screenshots -name "*.png" 2>/dev/null | wc -l)
54 echo " โ
ui/e2e/screenshots exists with $count PNG files (ignored)"
55else
56 echo " โ ui/e2e/screenshots missing"
57fi
58
59echo "\n๐ฏ Summary: .gitignore is properly configured to exclude build outputs while preserving source code."