mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: checkVersion
This commit is contained in:
parent
7cafbdfae5
commit
d5a3687f2b
@ -12,9 +12,9 @@ export async function checkVersion() {
|
|||||||
const latestVersionText = await getRemoteVersion();
|
const latestVersionText = await getRemoteVersion();
|
||||||
const latestVersion = latestVersionText.split(".");
|
const latestVersion = latestVersionText.split(".");
|
||||||
log("llonebot last version", latestVersion);
|
log("llonebot last version", latestVersion);
|
||||||
const currentVersion = version.split(".");
|
const currentVersion: string[] = version.split(".");
|
||||||
for (let k in [0, 1, 2]) {
|
for (let k of [0, 1, 2]) {
|
||||||
if (latestVersion[k] > currentVersion[k]) {
|
if (parseInt(latestVersion[k]) > parseInt(currentVersion[k])) {
|
||||||
return { result: false, version: latestVersionText };
|
return { result: false, version: latestVersionText };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user