Commit 0b4db63580f25cbb9c979cef03c516dde21404dc
Exists in
master
and in
17 other branches
Merge branch 'backup_restore_hooks' into 'master'
Backup Restore Hooks
Showing
2 changed files
with
17 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb | ||
2 | +index 20fd5ba..552f7ea 100644 | ||
3 | +--- a/lib/backup/repository.rb | ||
4 | ++++ b/lib/backup/repository.rb | ||
5 | +@@ -72,8 +72,7 @@ module Backup | ||
6 | + end | ||
7 | + | ||
8 | + print 'Put GitLab hooks in repositories dirs'.yellow | ||
9 | +- gitlab_shell_user_home = File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}") | ||
10 | +- if system("#{gitlab_shell_user_home}/gitlab-shell/support/rewrite-hooks.sh", Gitlab.config.gitlab_shell.repos_path) | ||
11 | ++ if system("#{Gitlab.config.gitlab_shell.path}/support/rewrite-hooks.sh", Gitlab.config.gitlab_shell.repos_path) | ||
12 | + puts " [DONE]".green | ||
13 | + else | ||
14 | + puts " [FAILED]".red |
config/software/gitlab-rails.rb
@@ -51,6 +51,9 @@ build do | @@ -51,6 +51,9 @@ build do | ||
51 | # the GitLab backup script. | 51 | # the GitLab backup script. |
52 | patch :source => "backup_uploads_realpath.patch" | 52 | patch :source => "backup_uploads_realpath.patch" |
53 | 53 | ||
54 | + # Patch the gitlab backup script to correctly restore gitlab-shell hooks | ||
55 | + patch :source => "backup_restore_hooks.patch" | ||
56 | + | ||
54 | bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem", :env => env | 57 | bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem", :env => env |
55 | 58 | ||
56 | # In order to precompile the assets, we need to get to a state where rake can | 59 | # In order to precompile the assets, we need to get to a state where rake can |