summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2020-03-28 18:19:43 -0600
committerAaron Ball <nullspoon@oper.io>2020-03-28 18:19:43 -0600
commit75b52e019be07c3530dd90236370b1670992d570 (patch)
tree656a67e58ec216cb512bfa87755e732f5bc7af0a /hooks
parent5a3876588e59d1a4589911ceb6aaa419205b0ab0 (diff)
downloadtestrepo-75b52e019be07c3530dd90236370b1670992d570.tar.gz
testrepo-75b52e019be07c3530dd90236370b1670992d570.tar.xz
add hooks file
Diffstat (limited to 'hooks')
-rw-r--r--hooks/post-receive19
1 files changed, 19 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive
new file mode 100644
index 0000000..d759dcb
--- /dev/null
+++ b/hooks/post-receive
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+source ~/git-shell-variables.sh
+source ~/bin/libgithook.sh
+
+load_file_actions
+dump_sess
+
+cache="$(deploy_cache ${NEWREV})"
+
+for i in ${FILES_M[@]} ${FILES_A[@]}; do
+ f="$(basename ${i})"
+ d="$(dirname ${i})"
+
+ # Deploy git hook updates
+ if [ "${d}" = 'hooks' ]; then
+ cp -v "${cache}/${i}" "${src}/hooks/"
+ fi
+done

Generated by cgit