[gobject-introspection] Automatically install pre-commit hook



commit aae598e1e60aad3d30b21c398f55e9b6944be971
Author: Martin Pitt <martinpitt gnome org>
Date:   Tue Dec 18 09:35:02 2012 +0100

    Automatically install pre-commit hook
    
    Instead of telling the user to do so and failing, we can just install the hook
    ourselves. This saves the user some trouble and more importantly avoids
    breaking tests in jhbuild continuous integration setups.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686388

 Makefile.am |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c4f6703..7016458 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,10 +58,7 @@ EXTRA_DIST += 			\
 
 check-local:
 	gtester --verbose $(GTESTER_PROGS)
-	@test ! -d $(top_srcdir)/.git || (test -f $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: missing \
-	pre-commit hook.\n\ncopy misc/pre-commit to .git/hooks"; false))
-	@test ! -d $(top_srcdir)/.git || (test -x $(top_srcdir)/.git/hooks/pre-commit || (echo -e "ERROR: pre-commit \
-	is not executable\n\nrun chmod +x .git/hooks/pre-commit"; false))
+	@test ! -d $(top_srcdir)/.git || (test -f $(top_srcdir)/.git/hooks/pre-commit || install misc/pre-commit .git/hooks/pre-commit)
 	@echo "TEST: PEP-8 INQUISITION"
 	@find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat --exclude=config.py
 	@echo "TEST: Annotation pattern programs"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]