Commit 18fc0900523a850179bb15f8ca73a0bdf8631607

Authored by Dmitriy Zaporozhets
1 parent bd3288e3

remove hooks and support scripts from main repo. Moved to gitlab-shell

lib/hooks/post-receive
... ... @@ -1,12 +0,0 @@
1   -#!/usr/bin/env bash
2   -
3   -# Version 4.1
4   -# This file was placed here by GitLab. It makes sure that your pushed commits
5   -# will be processed properly.
6   -
7   -while read oldrev newrev ref
8   -do
9   - # For every branch or tag that was pushed, create a Resque job in redis.
10   - repo_path=`pwd`
11   - env -i redis-cli rpush "resque:gitlab:queue:post_receive" "{\"class\":\"PostReceive\",\"args\":[\"$repo_path\",\"$oldrev\",\"$newrev\",\"$ref\",\"$GL_USER\"]}" > /dev/null 2>&1
12   -done
lib/support/rewrite-hooks.sh
... ... @@ -1,32 +0,0 @@
1   -#!/bin/bash
2   -
3   -src="/home/git/repositories"
4   -
5   -for dir in `ls "$src/"`
6   -do
7   - if [ -d "$src/$dir" ]; then
8   -
9   - if [ "$dir" = "gitolite-admin.git" ]
10   - then
11   - continue
12   - fi
13   -
14   - if [[ "$dir" =~ ^.*.git$ ]]
15   - then
16   - project_hook="$src/$dir/hooks/post-receive"
17   - gitolite_hook="/home/git/.gitolite/hooks/common/post-receive"
18   -
19   - ln -s -f $gitolite_hook $project_hook
20   - else
21   - for subdir in `ls "$src/$dir/"`
22   - do
23   - if [ -d "$src/$dir/$subdir" ] && [[ "$subdir" =~ ^.*.git$ ]]; then
24   - project_hook="$src/$dir/$subdir/hooks/post-receive"
25   - gitolite_hook="/home/git/.gitolite/hooks/common/post-receive"
26   -
27   - ln -s -f $gitolite_hook $project_hook
28   - fi
29   - done
30   - fi
31   - fi
32   -done
lib/support/truncate_repositories.sh
... ... @@ -1,11 +0,0 @@
1   -#!/bin/bash
2   -
3   -echo "Danger!!! Data Loss"
4   -while true; do
5   - read -p "Do you wish to all directories except gitolite-admin.git from /home/git/repositories/ (y/n) ?: " yn
6   - case $yn in
7   - [Yy]* ) sh -c "find /home/git/repositories/. -maxdepth 1 -not -name 'gitolite-admin.git' -not -name '.' | xargs sudo rm -rf"; break;;
8   - [Nn]* ) exit;;
9   - * ) echo "Please answer yes or no.";;
10   - esac
11   -done