2014-09-03 10:10:41 -04:00
|
|
|
class MigrateToNewShell < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
gitlab_shell_path = Gitlab.config.gitlab_shell.path
|
2014-09-08 04:16:15 -04:00
|
|
|
if system("#{gitlab_shell_path}/bin/create-hooks")
|
2014-09-03 10:10:41 -04:00
|
|
|
puts 'Repositories updated with new hooks'
|
|
|
|
else
|
|
|
|
raise 'Failed to rewrite gitlab-shell hooks in repositories'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|