FIX: copy local theme changes to correct temp folder when diffing updates to remote theme

Previously, local changes were being copied to a subfolder, resulting in lots of false positive diff changes.
This commit is contained in:
Penar Musaraj 2019-06-27 13:01:09 -04:00
parent 23c5da4617
commit 5cf5e73536

View File

@ -38,7 +38,7 @@ class ThemeStore::GitImporter
Dir.chdir(@temp_folder) do
Discourse::Utils.execute_command("git", "checkout", local_version)
Discourse::Utils.execute_command("rm -rf ./*/")
Discourse::Utils.execute_command("cp", "-rf", "#{local_temp_folder}/#{exporter.export_name}/", @temp_folder)
Discourse::Utils.execute_command("cp", "-rf", "#{local_temp_folder}/#{exporter.export_name}/.", @temp_folder)
Discourse::Utils.execute_command("git", "checkout", "about.json")
# adding and diffing on staged so that we catch uploads
Discourse::Utils.execute_command("git", "add", "-A")