Skip to content

Commit

Permalink
v36
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxiaoxiao committed Dec 2, 2020
1 parent 8c70020 commit 8e239a3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .quasar/electron/electron-main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "ace-editor",
"version": "35.0.0",
"version": "36.0.0",
"description": "A Quasar Framework app",
"productName": "Quasar App",
"author": "wanghuajie <wanghuajie@xuetangx.com>",
"private": true,
"scripts": {
"lint": "eslint --ext .js,.ts,.vue ./",
"test": "echo \"No test specified\" && exit 0",
Expand Down Expand Up @@ -52,5 +51,6 @@
"node": ">= 10.18.1",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
}
},
"repository": "https://github.com/small145900/myelectron.git"
}
19 changes: 8 additions & 11 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,25 +188,22 @@ module.exports = configure(function (ctx) {
// Windows only
// win32metadata: { ... }
},
"repository": {
"type": "git",
"url": "git+https://github.com/small145900/myelectron.git"
},
builder: {
// https://www.electron.build/configuration/configuration

appId: 'ace-editor',
productName: 'small app',
// publish: [
// {
// provider: 'github',
// repo: 'myelectron',
// own: 'small145900'
publish: [
{
provider: 'github',
repo: 'myelectron',
own: 'small145900',
updaterCacheDirName: 'ace-editor'
// provider: 'generic',
// url: 'https://github.com/small145900/myelectron/tree/master/dist/' // 更新服务器地址
// url: 'http://127.0.0.1:4000/download/' // 更新服务器地址
// }
// ],
}
],
"nsis": {
"oneClick": true,
"perMachine": true,
Expand Down
8 changes: 7 additions & 1 deletion src-electron/main-process/electron-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { app, BrowserWindow, nativeTheme, ipcMain } from 'electron'

import { autoUpdater } from 'electron-updater'
const os = require('os');
// const fs = require('fs-extra')
const path = require('path');
const log = require('electron-log')
const packageInfo = require('../../package.json');
Expand Down Expand Up @@ -78,8 +79,13 @@ function updateHandle() {
// autoUpdater.updateConfigPath = path.join(__dirname, 'Contents/Resources/app-update.yml')
// autoUpdater.updateConfigPath = path.join(__dirname, 'win-unpacked/resources/app-update.yml')
}

// 更新前,删除本地安装包
// let updaterCacheDirName = 'ace-editor'
// const updatePendingPath = path.join(autoUpdater.app.baseCachePath, updaterCacheDirName, 'pending')
// fs.emptyDir(updatePendingPath)

// autoUpdater.setFeedURL(uploadUrl);
autoUpdater.setFeedURL(uploadUrl);

autoUpdater.on('error', function (error) {
sendUpdateMessage(message.error)
Expand Down

0 comments on commit 8e239a3

Please sign in to comment.