diff options
author | LeonB <leon@tim-online.nl> | 2012-08-28 10:57:23 +0200 |
---|---|---|
committer | LeonB <leon@tim-online.nl> | 2012-08-28 10:57:23 +0200 |
commit | c81d4ab4a9101620e06cb401e7267789a6376d36 (patch) | |
tree | 902903e71d2cc42ecbc97be7aa8159bf7609f66f /lib/tasks | |
parent | 04b2864b64a11a347401e1817d1409e9c8b3b50f (diff) | |
download | gitlab-ce-c81d4ab4a9101620e06cb401e7267789a6376d36.tar.gz |
Fixed some hardcoded paths
New config option: git_hooks_path
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/gitlab/backup.rake | 1 | ||||
-rw-r--r-- | lib/tasks/gitlab/status.rake | 2 | ||||
-rw-r--r-- | lib/tasks/gitlab/write_hook.rake | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake index 8e2fa2c0133..4dffd1ada65 100644 --- a/lib/tasks/gitlab/backup.rake +++ b/lib/tasks/gitlab/backup.rake @@ -145,6 +145,7 @@ namespace :gitlab do permission_commands = [ "sudo chmod -R g+rwX #{Gitlab.config.git_base_path}", "sudo chown -R #{Gitlab.config.ssh_user}:#{Gitlab.config.ssh_user} #{Gitlab.config.git_base_path}", + "sudo chown gitlab:gitlab #{Gitlab.config.git_base_path}**/hooks/post-receive" ] permission_commands.each { |command| Kernel.system(command) } puts "[DONE]".green diff --git a/lib/tasks/gitlab/status.rake b/lib/tasks/gitlab/status.rake index 02d27d4bbcc..91456189d53 100644 --- a/lib/tasks/gitlab/status.rake +++ b/lib/tasks/gitlab/status.rake @@ -56,7 +56,7 @@ namespace :gitlab do return end - gitolite_hooks_path = File.join("/home", Gitlab.config.ssh_user, "share", "gitolite", "hooks", "common") + gitolite_hooks_path = File.join(Gitlab.config.git_hooks_path, "common") gitlab_hook_files = ['post-receive'] gitlab_hook_files.each do |file_name| dest = File.join(gitolite_hooks_path, file_name) diff --git a/lib/tasks/gitlab/write_hook.rake b/lib/tasks/gitlab/write_hook.rake index 098331b8cd7..9ec9c8383e2 100644 --- a/lib/tasks/gitlab/write_hook.rake +++ b/lib/tasks/gitlab/write_hook.rake @@ -2,7 +2,7 @@ namespace :gitlab do namespace :gitolite do desc "GITLAB | Write GITLAB hook for gitolite" task :write_hooks => :environment do - gitolite_hooks_path = File.join("/home", Gitlab.config.ssh_user, "share", "gitolite", "hooks", "common") + gitolite_hooks_path = File.join(Gitlab.config.git_hooks_path, "common") gitlab_hooks_path = Rails.root.join("lib", "hooks") gitlab_hook_files = ['post-receive'] |