From a69f3a0880154bf0cbbdf573e527e79b3cd571f8 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 22 Aug 2024 12:07:27 +0100 Subject: [PATCH] DEV: Add env to `themes:install:archive` to allow skipping child themes (#28484) --- lib/tasks/themes.rake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake index 9b49eaca1bb..6873dbb8e56 100644 --- a/lib/tasks/themes.rake +++ b/lib/tasks/themes.rake @@ -51,10 +51,13 @@ task "themes:install" => :environment do |task, args| exit 1 if counts[:errors] > 0 end +# env THEME_ARCHIVE - path to the archive +# env UPDATE_COMPONENTS - 0 to skip updating components 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)) + update_components = ENV["UPDATE_COMPONENTS"] == "0" ? false : true + RemoteTheme.update_zipped_theme(filename, File.basename(filename), update_components:) end def update_themes