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