[five-or-more/gsoc-vala-port: 8/29] Add style checker as pre-commit hook



commit 04ff05e599f22fba641009f63891a9bdb9bfaf63
Author: Ruxandra Simion <ruxandra simion93 gmail com>
Date:   Sat Jun 9 20:17:33 2018 +0300

    Add style checker as pre-commit hook

 meson_post_install.py | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/meson_post_install.py b/meson_post_install.py
index d6ca469..93f9629 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -13,3 +13,10 @@ if not os.environ.get('DESTDIR'):
 
        print('Compiling gsettings schemas...')
        subprocess.call(['glib-compile-schemas', schemadir])
+
+sourcedir = os.environ['MESON_SOURCE_ROOT']
+hooksdir = os.path.join(sourcedir, '.git', 'hooks')
+precommit = os.path.join(hooksdir, 'pre-commit')
+if os.path.lexists(precommit):
+    os.remove(precommit)
+os.symlink('../../../libgnome-games-support/style-checker', precommit)


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