Fix backup/restore path_to_repo
This commit is contained in:
parent
891bc414b1
commit
2c8a46e0fe
|
@ -134,7 +134,7 @@ namespace :gitlab do
|
||||||
# Build a destination path for backup
|
# Build a destination path for backup
|
||||||
path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle")
|
path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle")
|
||||||
|
|
||||||
if Kernel.system("cd #{project.path_to_repo} > /dev/null 2>&1 && git bundle create #{path_to_bundle} --all > /dev/null 2>&1")
|
if Kernel.system("cd #{project.repository.path_to_repo} > /dev/null 2>&1 && git bundle create #{path_to_bundle} --all > /dev/null 2>&1")
|
||||||
puts "[DONE]".green
|
puts "[DONE]".green
|
||||||
else
|
else
|
||||||
puts "[FAILED]".red
|
puts "[FAILED]".red
|
||||||
|
@ -158,7 +158,7 @@ namespace :gitlab do
|
||||||
# Build a backup path
|
# Build a backup path
|
||||||
path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle")
|
path_to_bundle = File.join(backup_path_repo, project.path_with_namespace + ".bundle")
|
||||||
|
|
||||||
if Kernel.system("git clone --bare #{path_to_bundle} #{project.path_to_repo} > /dev/null 2>&1")
|
if Kernel.system("git clone --bare #{path_to_bundle} #{project.repository.path_to_repo} > /dev/null 2>&1")
|
||||||
puts "[DONE]".green
|
puts "[DONE]".green
|
||||||
else
|
else
|
||||||
puts "[FAILED]".red
|
puts "[FAILED]".red
|
||||||
|
|
Loading…
Reference in a new issue