Commit 9e13160e647c04d99c20cee2bda648f3cea4a9f0
Exists in
master
and in
4 other branches
Merge pull request #3688 from amacarthur/rake-fix
fixed broken gitlab version determination during backup
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/tasks/gitlab/backup.rake
@@ -11,8 +11,6 @@ namespace :gitlab do | @@ -11,8 +11,6 @@ namespace :gitlab do | ||
11 | Rake::Task["gitlab:backup:repo:create"].invoke | 11 | Rake::Task["gitlab:backup:repo:create"].invoke |
12 | Rake::Task["gitlab:backup:uploads:create"].invoke | 12 | Rake::Task["gitlab:backup:uploads:create"].invoke |
13 | 13 | ||
14 | - Dir.chdir(Gitlab.config.backup.path) | ||
15 | - | ||
16 | # saving additional informations | 14 | # saving additional informations |
17 | s = {} | 15 | s = {} |
18 | s[:db_version] = "#{ActiveRecord::Migrator.current_version}" | 16 | s[:db_version] = "#{ActiveRecord::Migrator.current_version}" |
@@ -20,6 +18,8 @@ namespace :gitlab do | @@ -20,6 +18,8 @@ namespace :gitlab do | ||
20 | s[:gitlab_version] = %x{git rev-parse HEAD}.gsub(/\n/,"") | 18 | s[:gitlab_version] = %x{git rev-parse HEAD}.gsub(/\n/,"") |
21 | s[:tar_version] = %x{tar --version | head -1}.gsub(/\n/,"") | 19 | s[:tar_version] = %x{tar --version | head -1}.gsub(/\n/,"") |
22 | 20 | ||
21 | + Dir.chdir(Gitlab.config.backup.path) | ||
22 | + | ||
23 | File.open("#{Gitlab.config.backup.path}/backup_information.yml", "w+") do |file| | 23 | File.open("#{Gitlab.config.backup.path}/backup_information.yml", "w+") do |file| |
24 | file << s.to_yaml.gsub(/^---\n/,'') | 24 | file << s.to_yaml.gsub(/^---\n/,'') |
25 | end | 25 | end |