FEATURE: Gz to zip for exports (#7889)

* Revert "Revert "FEATURE: admin/user exports are compressed using the zip format (#7784)""

This reverts commit f89bd55576.

* Replace .tar.zip with .zip
This commit is contained in:
Roman Rizzi
2019-07-18 09:34:48 -03:00
committed by GitHub
parent c1b58613a2
commit f5c707c97a
15 changed files with 127 additions and 38 deletions
+3 -7
View File
@@ -56,14 +56,10 @@ class ThemeStore::TgzExporter
end
private
def export_package
export_to_folder
Dir.chdir(@temp_folder) do
tar_filename = "#{@export_name}.tar"
Discourse::Utils.execute_command('tar', '--create', '--file', tar_filename, @export_name, failure_message: "Failed to tar theme.")
Discourse::Utils.execute_command('gzip', '-5', tar_filename, failure_message: "Failed to gzip archive.")
"#{@temp_folder}/#{tar_filename}.gz"
end
end
Dir.chdir(@temp_folder) { ZipUtils.new.zip_directory(@temp_folder, @export_name) }
end
end