From 4ee616e868a3a9bf83d57db6bdf171babfa80d9e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 9 Feb 2016 21:48:15 +0300 Subject: [PATCH] Add post-merge and post-rewrite hooks These hooks compile python files to byte code. --- hooks/post-merge | 8 ++++++++ hooks/post-rewrite | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100755 hooks/post-merge create mode 100755 hooks/post-rewrite diff --git a/hooks/post-merge b/hooks/post-merge new file mode 100755 index 0000000..3bdcf5e --- /dev/null +++ b/hooks/post-merge @@ -0,0 +1,8 @@ +#!/bin/sh + +# post-merge hook that compiles python files to byte code + +python2.7 -m compileall -q . && +python2.7 -O -m compileall -q . + +exit 0 diff --git a/hooks/post-rewrite b/hooks/post-rewrite new file mode 100755 index 0000000..02466f9 --- /dev/null +++ b/hooks/post-rewrite @@ -0,0 +1,8 @@ +#!/bin/sh + +# post-rewrite hook that compiles python files to byte code + +python2.7 -m compileall -q . && +python2.7 -O -m compileall -q . + +exit 0 -- 2.39.5