feat: Add 'doctor' and 'sync' Makefile targets
This commit is contained in:
parent
ddd86fd5d5
commit
3a2d69619c
1 changed files with 17 additions and 0 deletions
17
Makefile
17
Makefile
|
|
@ -15,6 +15,8 @@ help:
|
||||||
@echo " make status - Check submodule and encryption status"
|
@echo " make status - Check submodule and encryption status"
|
||||||
@echo " make lint - Verify schema, privacy flags, and metadata"
|
@echo " make lint - Verify schema, privacy flags, and metadata"
|
||||||
@echo " make lock - Lock all encrypted files across all genomes"
|
@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:
|
lint:
|
||||||
@bash scripts/lint-genomes.sh
|
@bash scripts/lint-genomes.sh
|
||||||
|
|
@ -36,6 +38,21 @@ status:
|
||||||
@echo "--- Encryption Status (First 10 files) ---"
|
@echo "--- Encryption Status (First 10 files) ---"
|
||||||
@git-crypt status | head -n 10
|
@git-crypt status | head -n 10
|
||||||
|
|
||||||
|
doctor:
|
||||||
|
@echo "Checking required tools..."
|
||||||
|
@command -v git >/dev/null 2>&1 || { echo " MISSING: git"; exit 1; }
|
||||||
|
@command -v git-crypt >/dev/null 2>&1 || { echo " MISSING: git-crypt"; exit 1; }
|
||||||
|
@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."
|
||||||
|
@echo "System ready."
|
||||||
|
|
||||||
|
sync:
|
||||||
|
@echo "Syncing submodules..."
|
||||||
|
@git submodule update --init --recursive
|
||||||
|
@echo "--- Unpushed commits per genome ---"
|
||||||
|
@git submodule foreach 'git log --oneline @{u}.. 2>/dev/null | head -5 || true'
|
||||||
|
|
||||||
lock:
|
lock:
|
||||||
@echo "Locking master repository..."
|
@echo "Locking master repository..."
|
||||||
@git-crypt lock 2>/dev/null || true
|
@git-crypt lock 2>/dev/null || true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue