From c625293b995cf21a1b551cecaac3cb742fcb2e66 Mon Sep 17 00:00:00 2001 From: randx Date: Tue, 21 Aug 2012 20:14:06 +0300 Subject: Handle post-receive files via gitolite, not gitlab --- lib/hooks/post-receive | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 lib/hooks/post-receive (limited to 'lib/hooks') diff --git a/lib/hooks/post-receive b/lib/hooks/post-receive new file mode 100755 index 00000000000..d38bd13e19d --- /dev/null +++ b/lib/hooks/post-receive @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# This file was placed here by Gitlab. It makes sure that your pushed commits +# will be processed properly. + +while read oldrev newrev ref +do + # For every branch or tag that was pushed, create a Resque job in redis. + pwd=`pwd` + reponame=`basename "$pwd" | cut -d. -f1` + env -i redis-cli rpush "resque:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1 +done -- cgit v1.2.1