Status / debug: "Check for an update now" — past the update check's 10 min cache
This commit is contained in:
1 parent
d58f7efc41
commit
a11a71dc89
5 files changed
+17
-6
No files matched your search
@@ -511,6 +511,7 @@ module Maptool
|
||||
require_login!
|
||||
halt json(enabled: false) unless SELF_UPDATE
|
||||
|
||||
Updater.reset! if params[:fresh] # "Check now": past the 10 min cache
|
||||
latest = Updater.latest(GITEA_URL, UPDATE_REPO)
|
||||
available = !!latest && latest[:ci] == "success" && latest[:sha] && !latest[:sha].start_with?(REVISION)
|
||||
json enabled: true, current: REVISION, latest: latest&.dig(:sha)&.slice(0, 7), ci: latest&.dig(:ci),
|
||||
|
||||
Reference in new issue
Block a user