2012-05-31 15:19:48 +02:00
|
|
|
#!/usr/bin/env bash
|
2011-12-13 01:03:26 +01:00
|
|
|
|
2012-09-06 09:50:47 +02:00
|
|
|
# This file was placed here by GitLab. It makes sure that your pushed commits
|
2011-12-13 01:03:26 +01:00
|
|
|
# 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`
|
2012-09-21 21:02:59 +02:00
|
|
|
reponame=`basename "$pwd" | sed s/\.git$//`
|
2012-11-20 23:40:29 +01:00
|
|
|
env -i redis-cli rpush "resque:gitlab:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$reponame\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1
|
2011-12-13 01:03:26 +01:00
|
|
|
done
|