mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: Backup script with custom filename needs to include version number.
This commit is contained in:
parent
72b321b7b4
commit
02d63d5bc6
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue