Consolidate 26+ scattered scripts into maintainable hierarchy: New Structure: - ci/ CI/CD validation (checks.sh, test.sh, verify-paths.sh) - dev/ Development workflow (smoke-test.sh, manage-artifacts.sh) - release/ Release preparation (cleanup.sh, prepare.sh, sanitize.sh, verify.sh, verify-checksums.sh) - testing/ Test infrastructure (unchanged) - benchmarks/ Performance tools (track-performance.sh) - maintenance/ System cleanup (unchanged) - lib/ Shared functions (unchanged) Key Changes: - Unified 6 cleanup-*.sh scripts into release/cleanup.sh with targets - Merged smoke-test-native.sh into dev/smoke-test.sh --native flag - Renamed scripts to follow lowercase-hyphen convention - Moved root-level scripts to appropriate categories - Updated all Makefile references - Updated scripts/README.md with new structure Script count: 26 → 17 (35% reduction) Breaking Changes: - Old paths no longer exist, update any direct script calls - Use make targets (e.g., make ci-checks) for stability
72 lines
1.8 KiB
Bash
Executable file
72 lines
1.8 KiB
Bash
Executable file
#!/bin/bash
|
||
# Verify repository path conventions
|
||
|
||
set -euo pipefail
|
||
|
||
FAILED=0
|
||
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
||
|
||
echo "=== Path Convention Verification ==="
|
||
|
||
# Check 1: No binaries in root
|
||
echo "Checking for binaries in root..."
|
||
for binary in api-server worker tui data_manager; do
|
||
if [ -f "./$binary" ]; then
|
||
echo "✗ FAIL: Binary $binary found in root (should be in bin/)"
|
||
FAILED=1
|
||
fi
|
||
done
|
||
if [ $FAILED -eq 0 ]; then
|
||
echo "✓ No binaries in root"
|
||
fi
|
||
|
||
# Check 2: No .DS_Store files
|
||
echo "Checking for .DS_Store files..."
|
||
DSSTORE_COUNT=$(find . -name ".DS_Store" -type f 2>/dev/null | wc -l)
|
||
if [ "$DSSTORE_COUNT" -gt 0 ]; then
|
||
echo "✗ FAIL: $DSSTORE_COUNT .DS_Store file(s) found"
|
||
find . -name ".DS_Store" -type f | head -5
|
||
FAILED=1
|
||
else
|
||
echo "✓ No .DS_Store files"
|
||
fi
|
||
|
||
# Check 3: No coverage.out in root
|
||
echo "Checking for coverage.out in root..."
|
||
if [ -f "./coverage.out" ]; then
|
||
echo "✗ FAIL: coverage.out found in root (should be in coverage/)"
|
||
FAILED=1
|
||
else
|
||
echo "✓ No coverage.out in root"
|
||
fi
|
||
|
||
# Check 4: Bin directory should exist or be empty
|
||
echo "Checking bin/ directory..."
|
||
if [ -d "./bin" ]; then
|
||
BIN_COUNT=$(ls -1 ./bin 2>/dev/null | wc -l)
|
||
echo "✓ bin/ exists ($BIN_COUNT files)"
|
||
else
|
||
echo "ℹ bin/ does not exist (will be created by make build)"
|
||
fi
|
||
|
||
# Check 5: Data directories should be gitignored
|
||
echo "Checking data/ directory..."
|
||
if [ -d "./data" ]; then
|
||
if git check-ignore -q ./data 2>/dev/null; then
|
||
echo "✓ data/ is gitignored"
|
||
else
|
||
echo "⚠ WARNING: data/ exists but may not be gitignored"
|
||
fi
|
||
else
|
||
echo "ℹ data/ does not exist"
|
||
fi
|
||
|
||
# Summary
|
||
echo ""
|
||
if [ $FAILED -eq 0 ]; then
|
||
echo "✓ All path conventions verified"
|
||
exit 0
|
||
else
|
||
echo "✗ Path convention verification failed"
|
||
exit 1
|
||
fi
|