mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:52:19 +08:00
FIX: Backup script with custom filename needs to include version number.
This commit is contained in:
parent
72b321b7b4
commit
02d63d5bc6
|
@ -41,6 +41,9 @@ class DiscourseCLI < Thor
|
|||
backup = backuper.run
|
||||
if filename.present?
|
||||
puts "Moving '#{backup}' to '#{filename}'"
|
||||
puts "Including version number into '#{filename}'"
|
||||
version_string = File.basename(backup)[/-#{BackupRestore::VERSION_PREFIX}\d{14}/]
|
||||
filename = filename.dup.insert(filename.index('.'), version_string)
|
||||
FileUtils.mv(backup, filename)
|
||||
backup = filename
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user