Commit 9e13160e647c04d99c20cee2bda648f3cea4a9f0

Authored by Dmitriy Zaporozhets
2 parents b5426d57 2ad723e1

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 11 Rake::Task["gitlab:backup:repo:create"].invoke
12 12 Rake::Task["gitlab:backup:uploads:create"].invoke
13 13  
14   - Dir.chdir(Gitlab.config.backup.path)
15   -
16 14 # saving additional informations
17 15 s = {}
18 16 s[:db_version] = "#{ActiveRecord::Migrator.current_version}"
... ... @@ -20,6 +18,8 @@ namespace :gitlab do
20 18 s[:gitlab_version] = %x{git rev-parse HEAD}.gsub(/\n/,"")
21 19 s[:tar_version] = %x{tar --version | head -1}.gsub(/\n/,"")
22 20  
  21 + Dir.chdir(Gitlab.config.backup.path)
  22 +
23 23 File.open("#{Gitlab.config.backup.path}/backup_information.yml", "w+") do |file|
24 24 file << s.to_yaml.gsub(/^---\n/,'')
25 25 end
... ...