Commit 1c70e211 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'create-hooks' into 'master'

Use create-hooks instead of rewrite-hooks.sh

The rewrite-hooks.sh script is a deprecated wrapper for gitlab-shell's
create-hooks script.

See merge request !1068
parents 1aec74f3 042465c4
class MigrateToNewShell < ActiveRecord::Migration
def change
gitlab_shell_path = Gitlab.config.gitlab_shell.path
if system("sh #{gitlab_shell_path}/support/rewrite-hooks.sh")
if system("#{gitlab_shell_path}/bin/create-hooks")
puts 'Repositories updated with new hooks'
else
raise 'Failed to rewrite gitlab-shell hooks in repositories'
......
......@@ -69,7 +69,7 @@ module Backup
end
print 'Put GitLab hooks in repositories dirs'.yellow
if system("#{Gitlab.config.gitlab_shell.path}/support/rewrite-hooks.sh", Gitlab.config.gitlab_shell.repos_path)
if system("#{Gitlab.config.gitlab_shell.path}/bin/create-hooks")
puts " [DONE]".green
else
puts " [FAILED]".red
......
......@@ -541,7 +541,7 @@ namespace :gitlab do
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}"
)
for_more_information(
"#{gitlab_shell_path}/support/rewrite-hooks.sh"
"#{gitlab_shell_path}/bin/create-hooks"
)
fix_and_rerun
next
......@@ -556,7 +556,7 @@ namespace :gitlab do
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}"
)
for_more_information(
"lib/support/rewrite-hooks.sh"
"#{gitlab_shell_path}/bin/create-hooks"
)
fix_and_rerun
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment