DEV: Add env to `themes:install:archive` to allow skipping child themes (#28484)

This commit is contained in:
David Taylor 2024-08-22 12:07:27 +01:00 committed by GitHub
parent 6997b3c5ce
commit a69f3a0880
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

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