build: 增量更新版本判断

pull/192/head
xiaojunnuo 2021-12-06 00:42:29 +08:00
parent 4345c23d96
commit e55f67c78b
4 changed files with 7 additions and 10 deletions

View File

@ -1,4 +1,4 @@
!macro customUnInit
MessageBox MB_OK "卸载前请务必手动右下角小图标退出DevSidecar之后,再进行下一步(如果已经退出请忽略)↘↘↘↘↘↘↘↘↘"
MessageBox MB_OK "卸载前请务必手动退出DevSidecar之后,再进行下一步(如果已经退出请忽略)"
ExecWait '"$INSTDIR\resources\extra\sysproxy.exe" set 1'
!macroend

View File

@ -1,6 +1,6 @@
{
"name": "@docmirror/dev-sidecar-gui",
"version": "1.7.2",
"version": "1.6.9",
"private": false,
"license": "MPL-2.0",
"main": "background.js",

View File

@ -83,14 +83,14 @@ function install (app, api) {
* @param version2
*/
async function isSupportPartUpdate (value) {
const info = await api.info.get()
console.log('升级版本:', value.version)
console.log('增量更新最小版本:', value.partMiniVersion)
console.log('当前版本:', info.version)
if (!value.partPackage) {
return false
}
const info = await this.$api.info.get()
if (value.partMiniVersion && value.partMiniVersion < info.version) {
return true
}
return false
return !!(value.partMiniVersion && value.partMiniVersion < info.version)
}
async function downloadNewVersion (value) {

View File

@ -2,6 +2,3 @@ const CryptoJs = require('crypto-js')
const ret = CryptoJs.SHA256('111111111111')
console.log(ret.toString(CryptoJs.enc.Base64))
console.log(1 / 2)
const version1 = '1.7.0'
console.log(version1.substring(0, version1.lastIndexOf('.')))