Commit 9d7e7327 authored by Ahmad Hassan's avatar Ahmad Hassan

Move backup custom hooks up a level

parent 5308b51e
...@@ -55,6 +55,8 @@ module Backup ...@@ -55,6 +55,8 @@ module Backup
backup_project_local(project) backup_project_local(project)
end end
end end
backup_custom_hooks(project)
rescue => e rescue => e
progress_warn(project, e, 'Failed to backup repo') progress_warn(project, e, 'Failed to backup repo')
end end
...@@ -63,8 +65,6 @@ module Backup ...@@ -63,8 +65,6 @@ module Backup
path_to_project_bundle = path_to_bundle(project) path_to_project_bundle = path_to_bundle(project)
Gitlab::GitalyClient::RepositoryService.new(project.repository) Gitlab::GitalyClient::RepositoryService.new(project.repository)
.create_bundle(path_to_project_bundle) .create_bundle(path_to_project_bundle)
backup_custom_hooks(project)
end end
def backup_project_local(project) def backup_project_local(project)
...@@ -74,8 +74,6 @@ module Backup ...@@ -74,8 +74,6 @@ module Backup
path_to_project_bundle = path_to_bundle(project) path_to_project_bundle = path_to_bundle(project)
backup_custom_hooks(project)
cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{path_to_project_repo} bundle create #{path_to_project_bundle} --all) cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{path_to_project_repo} bundle create #{path_to_project_bundle} --all)
output, status = Gitlab::Popen.popen(cmd) output, status = Gitlab::Popen.popen(cmd)
progress_warn(project, cmd.join(' '), output) unless status.zero? progress_warn(project, cmd.join(' '), output) unless status.zero?
......
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