Skip to content

Commit d9943a5

Browse files
committed
feat(hooks): consolidate lifecycle hooks into unified pre-commit hook
1 parent ffbaca2 commit d9943a5

File tree

5 files changed

+9
-401
lines changed

5 files changed

+9
-401
lines changed

.gemini/hooks/journal.py

Lines changed: 0 additions & 125 deletions
This file was deleted.

.gemini/hooks/make.py

Lines changed: 0 additions & 131 deletions
This file was deleted.

.gemini/hooks/pre-commit.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ def main():
2020
if not changed_files:
2121
return 0
2222

23+
# Run make
24+
print("Running validation (make test)...")
25+
res = run_command("make test")
26+
if res.returncode != 0:
27+
print("Validation failed:")
28+
print(res.stdout)
29+
print(res.stderr)
30+
return res.returncode
31+
2332
# Calculate max(mtime) for all changed files (excluding .gemini/ and the journal)
2433
meaningful_changes = [f for f in changed_files if not f.startswith(".gemini/") and f != journal_path]
2534

@@ -44,16 +53,6 @@ def main():
4453
print(f"Error: Updated journal required (update {journal_path} to include a summary of recent changes).")
4554
return 1
4655

47-
# Run make
48-
print("Running validation (make test)...")
49-
res = run_command("make test")
50-
if res.returncode != 0:
51-
print("Validation failed:")
52-
print(res.stdout)
53-
print(res.stderr)
54-
return res.returncode
55-
56-
print("Validation passed.")
5756
return 0
5857

5958
if __name__ == "__main__":

makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ all: test lint
44

55
test:
66
@echo "Running tests..."
7-
python3 tests/test_hooks.py
87

98
docs-serve:
109
@mkdocs serve

0 commit comments

Comments
 (0)