Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add rake task to install a theme from an archive (#18890)

Daniel Waterworth6f48502dd249
diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake
index b461e54b8bf..289823643fe 100644
--- a/lib/tasks/themes.rake
+++ b/lib/tasks/themes.rake
@@ -52,6 +52,12 @@ task "themes:install" => :environment do |task, args|
end
end
+desc "Install themes & theme components from an archive"
+task "themes:install:archive" => :environment do |task, args|
+ filename = ENV["THEME_ARCHIVE"]
+ RemoteTheme.update_zipped_theme(filename, File.basename(filename))
+end
+
def update_themes
Theme.includes(:remote_theme).where(enabled: true, auto_update: true).find_each do |theme|
begin