summaryrefslogtreecommitdiff
path: root/lib/post-receive-hook
blob: ec7c607f75d0f005547e11ebe13d7c89ee05ee7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/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\"]}" > /dev/null 2>&1
done