Browse Source

Merge pull request #1 from rubenvereecken/index-git-hook

Adds `make setup` and a pre-commit hook to rebuild index.
Leandro Ostera 10 years ago
parent
commit
0a3ab78615
3 changed files with 9 additions and 0 deletions
  1. 5 0
      Makefile
  2. 0 0
      pages/index.json
  3. 4 0
      scripts/pre-commit

+ 5 - 0
Makefile

@@ -1,3 +1,8 @@
 index:
 	@TLDRHOME=`pwd` ./scripts/build_index.rb
 	@echo "Index rebuilt."
+
+setup:
+	@cp ./scripts/pre-commit .git/hooks
+	@chmod +x .git/hooks/pre-commit
+	@echo "Git pre-commit hook installed."

File diff suppressed because it is too large
+ 0 - 0
pages/index.json


+ 4 - 0
scripts/pre-commit

@@ -0,0 +1,4 @@
+#!/bin/sh
+
+make index
+git add ./pages/index.json

Some files were not shown because too many files changed in this diff