From: Oleg Broytman Date: Tue, 9 Feb 2016 18:48:15 +0000 (+0300) Subject: Add post-merge and post-rewrite hooks X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=commitdiff_plain;h=4ee616e868a3a9bf83d57db6bdf171babfa80d9e Add post-merge and post-rewrite hooks These hooks compile python files to byte code. --- 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