Commit e7e1e99e authored by Hugo Duksis's avatar Hugo Duksis

retrieve settings with symbols

parent a8eb3fe1
...@@ -82,14 +82,14 @@ namespace :gitlab do ...@@ -82,14 +82,14 @@ namespace :gitlab do
end end
settings = YAML.load_file("backup_information.yml") settings = YAML.load_file("backup_information.yml")
ENV["VERSION"] = "#{settings["db_version"]}" if settings["db_version"].to_i > 0 ENV["VERSION"] = "#{settings[:db_version]}" if settings[:db_version].to_i > 0
# restoring mismatching backups can lead to unexpected problems # restoring mismatching backups can lead to unexpected problems
if settings["gitlab_version"] != %x{git rev-parse HEAD}.gsub(/\n/,"") if settings[:gitlab_version] != %x{git rev-parse HEAD}.gsub(/\n/,"")
puts "gitlab_version mismatch:".red puts "gitlab_version mismatch:".red
puts " Your current HEAD differs from the HEAD in the backup!".red puts " Your current HEAD differs from the HEAD in the backup!".red
puts " Please switch to the following revision and try again:".red puts " Please switch to the following revision and try again:".red
puts " revision: #{settings["gitlab_version"]}".red puts " revision: #{settings[:gitlab_version]}".red
exit 1 exit 1
end end
......
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