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

This commit is contained in:
Daniel Waterworth
2022-11-04 16:42:07 -05:00
committed by GitHub
parent 4542bf4fef
commit 6f48502dd2

View File

@ -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