feat(build): Introduce testing, structure management, and linked genome support
This commit is contained in:
parent
624bd5f8d5
commit
42c1302035
2 changed files with 27 additions and 13 deletions
40
Makefile
40
Makefile
|
|
@ -1,22 +1,25 @@
|
|||
# =============================================================================
|
||||
# Knowledge Genome - Makefile v. 1.0.0
|
||||
# Knowledge Genome - Makefile v. 1.1.0
|
||||
# Orchestrates the setup and management of the knowledge base.
|
||||
# =============================================================================
|
||||
|
||||
include globals.env
|
||||
export $(shell grep -v '^[#[:space:]]' globals.env | sed 's/=.*//')
|
||||
|
||||
.PHONY: setup add-genome status lint lock doctor sync help
|
||||
.PHONY: setup add-genome status lint lock doctor sync test verify-structure sync-structure help
|
||||
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " make setup - Full system initialization"
|
||||
@echo " make add-genome - Register and scaffold a new genome"
|
||||
@echo " make status - Check submodule and encryption status"
|
||||
@echo " make lint - Verify schema, privacy flags, and metadata"
|
||||
@echo " make lock - Lock all encrypted files across all genomes"
|
||||
@echo " make doctor - Verify all required tools are installed"
|
||||
@echo " make sync - Sync submodules and report unpushed commits"
|
||||
@echo " make setup - Full system initialization"
|
||||
@echo " make add-genome - Register and scaffold a new genome [LINKED=owner/repo]"
|
||||
@echo " make status - Check submodule and encryption status"
|
||||
@echo " make lint - Verify schema, privacy flags, and metadata"
|
||||
@echo " make verify-structure - Report directory drift across all genomes"
|
||||
@echo " make sync-structure - Create any missing canonical dirs (safe)"
|
||||
@echo " make test - Run the bats test suite (no LLM/GPU needed)"
|
||||
@echo " make lock - Lock all encrypted files across all genomes"
|
||||
@echo " make doctor - Verify all required tools are installed"
|
||||
@echo " make sync - Sync submodules and report unpushed commits"
|
||||
|
||||
lint:
|
||||
@bash scripts/lint-genomes.sh
|
||||
|
|
@ -27,16 +30,26 @@ setup:
|
|||
add-genome:
|
||||
@if [ -z "$(NAME)" ] || [ -z "$(DESC)" ]; then \
|
||||
echo "Error: NAME and DESC are required."; \
|
||||
echo "Usage: make add-genome NAME=my-genome DESC='My description'"; \
|
||||
echo "Usage: make add-genome NAME=my-genome DESC='My description' [LINKED=owner/project-repo]"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@bash scripts/add-genome.sh "$(NAME)" "$(DESC)"
|
||||
@bash scripts/add-genome.sh "$(NAME)" "$(DESC)" "$(LINKED)"
|
||||
|
||||
status:
|
||||
@echo "--- Master Status ---"
|
||||
@git submodule status
|
||||
@echo "--- Encryption Status (First 10 files) ---"
|
||||
@git-crypt status | head -n 10
|
||||
@echo "--- Encryption Status (per genome) ---"
|
||||
@git submodule foreach 'git-crypt status 2>/dev/null | head -n 10 || true'
|
||||
|
||||
verify-structure:
|
||||
@bash scripts/verify-genomes.sh
|
||||
|
||||
sync-structure:
|
||||
@bash scripts/verify-genomes.sh --sync
|
||||
|
||||
test:
|
||||
@command -v bats >/dev/null 2>&1 || { echo " MISSING: bats (sudo apt install bats)"; exit 1; }
|
||||
@bats tests/
|
||||
|
||||
doctor:
|
||||
@echo "Checking required tools..."
|
||||
|
|
@ -45,6 +58,7 @@ doctor:
|
|||
@command -v curl >/dev/null 2>&1 || { echo " MISSING: curl"; exit 1; }
|
||||
@command -v jq >/dev/null 2>&1 || { echo " MISSING: jq"; exit 1; }
|
||||
@command -v bw >/dev/null 2>&1 || echo " OPTIONAL: bw (Bitwarden CLI) not found — key injection will be manual."
|
||||
@command -v python3 >/dev/null 2>&1 || echo " OPTIONAL: python3 not found — needed for 'make test' and the ingest skill (index-append.py), not for setup."
|
||||
@echo "System ready."
|
||||
|
||||
sync:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue