BigW Consortium Gitlab

20140903115954_migrate_to_new_shell.rb 370 Bytes
Newer Older
1
# rubocop:disable all
2 3
class MigrateToNewShell < ActiveRecord::Migration
  def change
4 5
    return if Rails.env.test?

6
    gitlab_shell_path = Gitlab.config.gitlab_shell.path
7
    if system("#{gitlab_shell_path}/bin/create-hooks")
8 9 10 11 12 13
      puts 'Repositories updated with new hooks'
    else
      raise 'Failed to rewrite gitlab-shell hooks in repositories'
    end
  end
end