Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,22 @@ async function onDeviceReady() {
(response) => {
const release = response.data;
// assuming version is in format v1.2.3
const versionFormat = /^v?(\d+(?:\.\d+)*)/;
const latestVersion = release.tag_name
.replace("v", "")
.match(versionFormat)?.[1]
.split(".")
.map(Number);
const currentVersion = BuildInfo.version.split(".").map(Number);
const currentVersion = BuildInfo.version
.match(versionFormat)?.[1]
.split(".")
.map(Number);
if (!(latestVersion && currentVersion)) {
window.log(
"error",
"Failed to parse version while checking for updates.",
);
return;
}
Comment thread
AuDevTist1C marked this conversation as resolved.

let hasUpdate = false;
for (let i = 0; i < latestVersion.length; i++) {
Expand Down