From 6f423b987f0c461ace7702a142c7230082d122be Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 3 Sep 2014 17:10:41 +0300 Subject: [PATCH] Update repos hooks in migration Signed-off-by: Dmitriy Zaporozhets --- db/migrate/20140903115954_migrate_to_new_shell.rb | 10 ++++++++++ db/schema.rb | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20140903115954_migrate_to_new_shell.rb 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 diff --git a/db/schema.rb b/db/schema.rb index 9159556ac72..a2dda07c102 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140730111702) do +ActiveRecord::Schema.define(version: 20140903115954) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" -- GitLab