diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-09-16 16:03:57 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-09-16 16:03:57 +0200 |
commit | 4bd94c073e92d256b6d75f69cba5142eaff122ff (patch) | |
tree | 64e3fa8b813938c0dcff242bb52c0dc5fbc600d7 /lib/gitlab_projects.rb | |
parent | db81327b909e2674312e53c97c742c35f432c5bd (diff) | |
download | gitlab-shell-4bd94c073e92d256b6d75f69cba5142eaff122ff.tar.gz |
Add '.old' when renaming existing hooks directory
Diffstat (limited to 'lib/gitlab_projects.rb')
-rw-r--r-- | lib/gitlab_projects.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index a216d8b..58bbd28 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -22,7 +22,7 @@ class GitlabProjects def self.create_hooks(path) local_hooks_directory = File.join(path, 'hooks') unless File.realpath(local_hooks_directory) == File.realpath(GLOBAL_HOOKS_DIRECTORY) - FileUtils.mv(local_hooks_directory, "#{local_hooks_directory}.#{Time.now.to_i}") + FileUtils.mv(local_hooks_directory, "#{local_hooks_directory}.old.#{Time.now.to_i}") FileUtils.ln_s(GLOBAL_HOOKS_DIRECTORY, local_hooks_directory) end end |