mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-28 07:03:20 +08:00
- Add scripts/clean.sh, test.sh, build.sh, lint.sh as single source
of truth for local and CI builds (always clean, always parallel)
- Fix -Wmissing-braces: replace {{0}} with memset for struct arrays
- Fix -Wrestrict: use intermediate buffer for same-struct snprintf
- Update dry-run.yml and release.yml to use the new scripts
30 lines
753 B
Bash
Executable File
30 lines
753 B
Bash
Executable File
#!/bin/bash
|
|
# clean.sh — Remove ALL build artifacts, caches, and generated files.
|
|
#
|
|
# Usage: scripts/clean.sh
|
|
#
|
|
# Ensures every subsequent build starts from scratch — no cached .o files,
|
|
# no stale node_modules, no leftover dist folders. This is the first step
|
|
# in both scripts/test.sh and scripts/build.sh.
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
echo "=== Cleaning build artifacts ==="
|
|
|
|
# C build artifacts
|
|
rm -rf "$ROOT/build/c"
|
|
|
|
# Frontend build artifacts
|
|
rm -rf "$ROOT/graph-ui/dist"
|
|
rm -rf "$ROOT/graph-ui/node_modules"
|
|
|
|
# Root-level node artifacts (if any)
|
|
rm -rf "$ROOT/node_modules"
|
|
|
|
# Generated embedded assets (regenerated by embed-frontend.sh)
|
|
rm -f "$ROOT/src/ui/embedded_assets.c"
|
|
|
|
echo "=== Clean complete ==="
|