|
|
|
@ -94,14 +94,19 @@ class RepositoriesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HOOK_TEMPLATE = %Q{#!/bin/sh
|
|
|
|
|
exec git update-server-info
|
|
|
|
|
|
|
|
|
|
CMD_PATH=`dirname $0`
|
|
|
|
|
cd $CMD_PATH
|
|
|
|
|
PY_PATH=$PWD/../../git_refresh_changes.py
|
|
|
|
|
[[ -s "$PY_PATH" ]] && $(which python) $PY_PATH $(dirname $PWD)
|
|
|
|
|
cd -
|
|
|
|
|
exec sh -c '
|
|
|
|
|
function update()
|
|
|
|
|
{
|
|
|
|
|
CMD_PATH=`dirname $0`;
|
|
|
|
|
cd $CMD_PATH;
|
|
|
|
|
PY_PATH=$PWD/../../git_refresh_changes.py;
|
|
|
|
|
[[ -s "$PY_PATH" ]] && $(which python) $PY_PATH $PWD;
|
|
|
|
|
cd -;
|
|
|
|
|
}
|
|
|
|
|
git update-server-info
|
|
|
|
|
update
|
|
|
|
|
'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def create
|
|
|
|
|
if params[:repository_scm].to_s == 'Gitlab'
|
|
|
|
|