mirror of https://github.com/logseq/logseq
Merge pull request #2058 from logseq/fix/version-of-check-updates
fix(desktop): broken version of checking updates manuallypull/2062/head
commit
bef8d0da68
|
@ -56,6 +56,11 @@
|
|||
(emit "checking-for-update" nil)
|
||||
(-> (p/let
|
||||
[artifact (get-latest-artifact-info repo)
|
||||
|
||||
artifact (when-let [remote-version (and artifact (re-find #"\d+\.\d+\.\d+" (:url artifact)))]
|
||||
(if (and (. semver valid remote-version)
|
||||
(. semver lt electron-version remote-version)) artifact))
|
||||
|
||||
url (if-not artifact (do (emit "update-not-available" nil) (throw nil)) (:url artifact))
|
||||
_ (if url (emit "update-available" (bean/->js artifact)) (throw (js/Error. "download url not exists")))
|
||||
;; start download FIXME: user's preference about auto download
|
||||
|
@ -108,7 +113,7 @@
|
|||
[repo]
|
||||
(when (.valid semver electron-version)
|
||||
(p/let [info (get-latest-artifact-info repo)]
|
||||
(when-let [remote-version (and info (re-find #"\d+.\d+.\d+" (:url info)))]
|
||||
(when-let [remote-version (and info (re-find #"\d+\.\d+\.\d+" (:url info)))]
|
||||
(if (and (. semver valid remote-version)
|
||||
(. semver lt electron-version remote-version))
|
||||
|
||||
|
|
Loading…
Reference in New Issue