docs(submodules): document surgical artifact cleanup helper; fix gitignore probe

Made-with: Cursor
This commit is contained in:
defiQUG
2026-04-07 22:10:42 -07:00
parent 07e0273dbc
commit 518923203e
2 changed files with 8 additions and 1 deletions

View File

@@ -29,6 +29,13 @@ bash scripts/verify/submodules-clean.sh
Stricter than `git status -sb` (fails on any porcelain output). Use after large merges or before release tagging.
### Surgical artifact cleanup (generated files only)
Some submodules historically tracked **build output** (TypeScript `.js` next to `.ts` under `packages/*/src`, or Foundry `artifacts/`). That noise is removed with **gitignore + `git rm --cached`**, not by discarding real source edits.
- Repeatable helper (idempotent): `bash scripts/maintenance/surgical-clean-submodule-artifacts.sh [--dry-run]`
- After it reports changes, **commit inside the submodule**, then bump the **parent** submodule pointer.
---
## explorer-monorepo: Gitea primary, GitHub optional mirror

View File

@@ -35,7 +35,7 @@ clean_the_order() {
return 0
fi
# Rules are committed in submodule; re-apply only if file missing patterns
if ! grep -q 'packages/\*\*/src/\*\*/\*\.js$' "$sub/.gitignore" 2>/dev/null; then
if ! grep -q 'packages/\*\*/src/\*\*' "$sub/.gitignore" 2>/dev/null; then
log " WARN: the-order/.gitignore missing expected emit rules — merge from main or run prior hygiene commit"
fi
local cnt