Backup wiki repo even if the main repo is empty
This fixes a bug where wiki repositories for projects with an empty main repository would not get backed up.
This commit is contained in:
parent
23ae3911aa
commit
0f29ccffd2
|
@ -11,6 +11,7 @@ v 6.9.0
|
|||
- Improve issue and merge request mobile UI (Drew Blessing)
|
||||
- Document how to convert a backup to PostgreSQL
|
||||
- Fix locale bug in backup manager
|
||||
- Fix wiki backup skip bug
|
||||
|
||||
v 6.8.0
|
||||
- Ability to at mention users that are participating in issue and merge req. discussion
|
||||
|
|
|
@ -10,15 +10,12 @@ module Backup
|
|||
Project.find_each(batch_size: 1000) do |project|
|
||||
print " * #{project.path_with_namespace} ... "
|
||||
|
||||
if project.empty_repo?
|
||||
puts "[SKIPPED]".cyan
|
||||
next
|
||||
end
|
||||
|
||||
# Create namespace dir if missing
|
||||
FileUtils.mkdir_p(File.join(backup_repos_path, project.namespace.path)) if project.namespace
|
||||
|
||||
if system(*%W(git --git-dir=#{path_to_repo(project)} bundle create #{path_to_bundle(project)} --all), silent)
|
||||
if project.empty_repo?
|
||||
puts "[SKIPPED]".cyan
|
||||
elsif system(*%W(git --git-dir=#{path_to_repo(project)} bundle create #{path_to_bundle(project)} --all), silent)
|
||||
puts "[DONE]".green
|
||||
else
|
||||
puts "[FAILED]".red
|
||||
|
|
Loading…
Reference in New Issue