mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix:version output
This commit is contained in:
parent
aded70eb2e
commit
9db28bd502
@ -21,15 +21,16 @@ checkVersion().then((remoteVersion: string) => {
|
|||||||
const localVersion = require('./package.json').version;
|
const localVersion = require('./package.json').version;
|
||||||
const localVersionList = localVersion.split('.');
|
const localVersionList = localVersion.split('.');
|
||||||
const remoteVersionList = remoteVersion.split('.');
|
const remoteVersionList = remoteVersion.split('.');
|
||||||
|
console.log('[NapCat] [Upate] 当前版本:', localVersion);
|
||||||
for (const k of [0, 1, 2]) {
|
for (const k of [0, 1, 2]) {
|
||||||
if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) {
|
if (parseInt(remoteVersionList[k]) > parseInt(localVersionList[k])) {
|
||||||
console.log('检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V', remoteVersion);
|
console.log('[NapCat] [Upate] 检测到更新,请前往 https://github.com/NapNeko/NapCatQQ 下载 NapCatQQ V', remoteVersion);
|
||||||
return;
|
return;
|
||||||
} else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) {
|
} else if (parseInt(remoteVersionList[k]) < parseInt(localVersionList[k])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('当前已是最新版本,版本:', localVersion);
|
console.log('[NapCat] [Upate] 当前已是最新版本');
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
new NapCatOnebot11();
|
new NapCatOnebot11();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user