Handle post-receive files via gitolite, not gitlab

This commit is contained in:
randx 2012-08-21 20:14:06 +03:00
parent 2e7ca8c866
commit c625293b99
7 changed files with 29 additions and 46 deletions

12
lib/hooks/post-receive Executable file
View file

@ -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