Commit 042465c4 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use create-hooks instead of rewrite-hooks.sh

The rewrite-hooks.sh script is a deprecated wrapper for gitlab-shell's
create-hooks script.
parent 1535835d
class MigrateToNewShell < ActiveRecord::Migration class MigrateToNewShell < ActiveRecord::Migration
def change def change
gitlab_shell_path = Gitlab.config.gitlab_shell.path 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' puts 'Repositories updated with new hooks'
else else
raise 'Failed to rewrite gitlab-shell hooks in repositories' raise 'Failed to rewrite gitlab-shell hooks in repositories'
......
...@@ -69,7 +69,7 @@ module Backup ...@@ -69,7 +69,7 @@ module Backup
end end
print 'Put GitLab hooks in repositories dirs'.yellow 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 puts " [DONE]".green
else else
puts " [FAILED]".red puts " [FAILED]".red
......
...@@ -541,7 +541,7 @@ namespace :gitlab do ...@@ -541,7 +541,7 @@ namespace :gitlab do
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}" "sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}"
) )
for_more_information( for_more_information(
"#{gitlab_shell_path}/support/rewrite-hooks.sh" "#{gitlab_shell_path}/bin/create-hooks"
) )
fix_and_rerun fix_and_rerun
next next
...@@ -556,7 +556,7 @@ namespace :gitlab do ...@@ -556,7 +556,7 @@ namespace :gitlab do
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}" "sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}"
) )
for_more_information( for_more_information(
"lib/support/rewrite-hooks.sh" "#{gitlab_shell_path}/bin/create-hooks"
) )
fix_and_rerun fix_and_rerun
end 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