diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-08-21 20:14:06 +0300 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-08-21 20:14:06 +0300 |
commit | c625293b995cf21a1b551cecaac3cb742fcb2e66 (patch) | |
tree | 3680e0658fcaaee990867bdd690bc1f7c78d394a /lib/hooks | |
parent | 2e7ca8c866179e78866cba1659dee45185911f5a (diff) | |
download | gitlab-ce-c625293b995cf21a1b551cecaac3cb742fcb2e66.tar.gz |
Handle post-receive files via gitolite, not gitlab
Diffstat (limited to 'lib/hooks')
-rwxr-xr-x | lib/hooks/post-receive | 12 |
1 files changed, 12 insertions, 0 deletions
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 |