This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib/tasks
David Taylor 6c3df84a93
DEV: In themes:update, only update themes which are out-of-date (#15676)
Running `update_from_remote` and `save!` cause a number of side-effects, including instructing all clients to reload CSS files. If there are no changes, then this is wasteful, and can even cause a 'flicker' effect on clients as they reload CSS.

This commit checks if any updates are available before triggering `update_from_remote` / `save!`. This should be much faster, and stop the 'flickering' UX from happening on every themes:update run.

It also improves the output of the command to include the from/to commit hashes, which may be useful for debugging issues. For example:

```
Checking 'Alien Night | A Dark Discourse Theme' for 'default'... already up to date
Checking 'Star Wars' for 'default'... updating from d8a170dd to 66b9756f
Checking 'Media Overlay' for 'default'... already up to date
```
2022-01-21 18:23:26 +00:00
..
add_topic_to_quotes.rake
admin.rake FIX: Create email token with correct scope (#15658) 2022-01-20 16:38:56 +02:00
annotate.rake
api.rake
assets.rake
auto_annotate_models.rake
autospec.rake
avatars.rake
backfill.thor
categories.rake
cdn.rake
db.rake
destroy.rake
dev.rake
docker.rake DEV: Wait for initdb to complete in docker.rake (#15614) 2022-01-17 17:45:39 +00:00
emails.rake
emoji.rake FEATURE: Add missing emojis (#15582) 2022-01-14 17:51:13 -03:00
export.rake
groups.rake
i18n.rake
images.rake
import.rake
incoming_emails.rake
integration.rake
javascript.rake
log.rake
maxminddb.rake
plugin.rake DEV: Update rake qunit:test and rake plugin:qunit to use testem 2022-01-18 10:16:29 +00:00
populate.rake
populate.thor
posts.rake
qunit.rake DEV: Update rake qunit:test and rake plugin:qunit to use testem 2022-01-18 10:16:29 +00:00
redis.rake
release_note.rake
rspec.rake
s3.rake
scheduler.rake
search.rake
site_settings.rake
site.rake
smoke_test.rake
svg_icons.rake
tags.rake
themes.rake DEV: In themes:update, only update themes which are out-of-date (#15676) 2022-01-21 18:23:26 +00:00
topics.rake
turbo.rake
typepad.thor
uploads.rake DEV: Try to download missing uploads from origin URL (#15629) 2022-01-19 11:05:58 +01:00
users.rake