diff --git a/packages/gui/.env.pre b/packages/gui/.env.pre index ba94875..54fb8f0 100644 --- a/packages/gui/.env.pre +++ b/packages/gui/.env.pre @@ -1,2 +1,2 @@ -VUE_APP_PUBLISH_URL=http://dev-sidecar.docmirror.cn/update/ +VUE_APP_PUBLISH_URL=http://dev-sidecar.docmirror.cn/update/preview/ VUE_APP_PUBLISH_PROVIDER=generic \ No newline at end of file diff --git a/packages/gui/src/bridge/update/backend.js b/packages/gui/src/bridge/update/backend.js index 4a8ccff..d780d21 100644 --- a/packages/gui/src/bridge/update/backend.js +++ b/packages/gui/src/bridge/update/backend.js @@ -48,14 +48,14 @@ function updateHandle (app, api, win, beforeQuit, quit, log) { updateNotAva: '当前为最新版本,无需更新' } // 本地开发环境,改变app-update.yml地址 - if (process.env.NODE_ENV === 'development' && !isMac) { - const publishUrl = process.env.VUE_APP_PUBLISH_URL - autoUpdater.setFeedURL({ - provider: 'generic', - url: publishUrl - }) + if (process.env.NODE_ENV === 'development') { + // const publishUrl = process.env.VUE_APP_PUBLISH_URL + // autoUpdater.setFeedURL({ + // provider: 'generic', + // url: publishUrl + // }) if (isMac) { - autoUpdater.updateConfigPath = path.join(__dirname, 'mac/DevSidecar.app/Contents/Resources/app-update.yml') + // autoUpdater.updateConfigPath = path.join(__dirname, 'mac/DevSidecar.app/Contents/Resources/app-update.yml') } else if (isLinux) { // autoUpdater.updateConfigPath = path.join(__dirname, 'mac/DevSidecar.app/Contents/Resources/app-update.yml') } else { diff --git a/packages/gui/src/bridge/update/front.js b/packages/gui/src/bridge/update/front.js index 051759b..24ede2b 100644 --- a/packages/gui/src/bridge/update/front.js +++ b/packages/gui/src/bridge/update/front.js @@ -73,6 +73,7 @@ function install (app, api) { }) return } + updateParams.downloading = true api.update.downloadUpdate() }) } @@ -82,7 +83,7 @@ function install (app, api) { if (updateParams.autoDownload !== false) { app.$message.info('发现新版本,正在下载中...') - updateParams.downloading = true + downloadNewVersion(value) return }