From c329654ebea8aac476200b83582ea8a58bb0a6e4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 25 Apr 2014 15:04:14 +0530 Subject: [PATCH] Add a hook to rebuild ui modules after a rebase --- setup/git_post_rewrite_hook.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 setup/git_post_rewrite_hook.py diff --git a/setup/git_post_rewrite_hook.py b/setup/git_post_rewrite_hook.py new file mode 100755 index 0000000000..740d8c7bbe --- /dev/null +++ b/setup/git_post_rewrite_hook.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# vim:fileencoding=utf-8 +from __future__ import (unicode_literals, division, absolute_import, + print_function) + +__license__ = 'GPL v3' +__copyright__ = '2014, Kovid Goyal ' + +import subprocess, os, sys + +base = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) +os.chdir(base) + +action = [x.decode('utf-8') if isinstance(x, bytes) else x for x in sys.argv[1:]][0] + +if action == 'rebase': + subprocess.check_call(['python', 'setup.py', 'gui']) + +