Commit b8115e76 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'backup_wiki_skip_bug' into 'master'

Fix wiki backup skip bug
parents 23ae3911 0f29ccff
...@@ -11,6 +11,7 @@ v 6.9.0 ...@@ -11,6 +11,7 @@ v 6.9.0
- Improve issue and merge request mobile UI (Drew Blessing) - Improve issue and merge request mobile UI (Drew Blessing)
- Document how to convert a backup to PostgreSQL - Document how to convert a backup to PostgreSQL
- Fix locale bug in backup manager - Fix locale bug in backup manager
- Fix wiki backup skip bug
v 6.8.0 v 6.8.0
- Ability to at mention users that are participating in issue and merge req. discussion - Ability to at mention users that are participating in issue and merge req. discussion
......
...@@ -10,15 +10,12 @@ module Backup ...@@ -10,15 +10,12 @@ module Backup
Project.find_each(batch_size: 1000) do |project| Project.find_each(batch_size: 1000) do |project|
print " * #{project.path_with_namespace} ... " print " * #{project.path_with_namespace} ... "
if project.empty_repo?
puts "[SKIPPED]".cyan
next
end
# Create namespace dir if missing # Create namespace dir if missing
FileUtils.mkdir_p(File.join(backup_repos_path, project.namespace.path)) if project.namespace 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 puts "[DONE]".green
else else
puts "[FAILED]".red puts "[FAILED]".red
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment