diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-03 18:10:41 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-03 18:10:41 +0400 |
commit | 6f423b987f0c461ace7702a142c7230082d122be (patch) | |
tree | 41bec3d503b03bf3e2033f163a08f46d375621d6 /db/migrate | |
parent | e8f1331fa4b3f4c4037f6509b2a846f521f506fc (diff) |
Update repos hooks in migration
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20140903115954_migrate_to_new_shell.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20140903115954_migrate_to_new_shell.rb b/db/migrate/20140903115954_migrate_to_new_shell.rb new file mode 100644 index 00000000000..69912887da8 --- /dev/null +++ b/db/migrate/20140903115954_migrate_to_new_shell.rb @@ -0,0 +1,10 @@ +class MigrateToNewShell < ActiveRecord::Migration + def change + gitlab_shell_path = Gitlab.config.gitlab_shell.path + if system("sh #{gitlab_shell_path}/support/rewrite-hooks.sh") + puts 'Repositories updated with new hooks' + else + raise 'Failed to rewrite gitlab-shell hooks in repositories' + end + end +end |