As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit cc1bf32e authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Add '.old' when renaming existing hooks directory

parent 4d1b2b88
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment