Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-05 22:20:11 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-05 22:20:11 +0400
commit6c206805ae445b7052d98640cb0083256d836db1 (patch)
tree06fbffae7622ec3b24fba6b03db69d20952e84b8 /lib/backup
parent3df5fee4ff20ef9cf4834ea15b0a2a0df5f5437b (diff)
Backup/restore wiki repos too
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/repository.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index 4c72e8e4a6e..14e59143250 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -23,6 +23,17 @@ module Backup
else
puts "[FAILED]".red
end
+
+ wiki = GollumWiki.new(project)
+
+ if File.exists?(path_to_repo(wiki))
+ print " * #{wiki.path_with_namespace} ... "
+ if system("cd #{path_to_repo(wiki)} > /dev/null 2>&1 && git bundle create #{path_to_bundle(wiki)} --all > /dev/null 2>&1")
+ puts " [DONE]".green
+ else
+ puts " [FAILED]".red
+ end
+ end
end
end
@@ -45,6 +56,17 @@ module Backup
else
puts "[FAILED]".red
end
+
+ wiki = GollumWiki.new(project)
+
+ if File.exists?(path_to_bundle(wiki))
+ print " * #{wiki.path_with_namespace} ... "
+ if system("git clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)} > /dev/null 2>&1")
+ puts " [DONE]".green
+ else
+ puts " [FAILED]".red
+ end
+ end
end
end