Skip to content

Commit

Permalink
feat: auto update for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
aqaurius6666 committed Apr 3, 2023
1 parent 5486eb9 commit d95bf8d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = async function () {
asar: true,
// Specify linux target just for disabling snap compilation
linux: {
target: 'deb',
target: 'AppImage',
publish: ['github'],
},
mac: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "MpbootGUI",
"description": "GUI Desktop Application for Mpboot",
"version": "2.0.0",
"version": "2.0.1",
"private": true,
"author": {
"name": "Vu Nguyen <aqaurius6666@gmail.com>"
Expand Down Expand Up @@ -68,7 +68,7 @@
"@patternfly/react-log-viewer": "^4.87.100",
"@reduxjs/toolkit": "^1.9.3",
"allotment": "^1.18.1",
"electron-updater": "5.3.0",
"electron-updater": "^5.3.0",
"glob": "^8.1.0",
"lodash.debounce": "^4.0.8",
"md5": "^2.3.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/common/parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface Parameter {
}

export const convertParameterToCommandArgs = (parameter: Parameter): string[] => {
const args = [];
const args = [] as string[];

if (parameter.source) {
args.push('-s');
Expand All @@ -22,3 +22,4 @@ export const convertParameterToCommandArgs = (parameter: Parameter): string[] =>

return args;
};

7 changes: 7 additions & 0 deletions packages/main/src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ const template = [
{
role: 'help',
submenu: [
{
label: 'Check for updates',
click: async () => {
const { autoUpdater } = require('electron-updater');
autoUpdater.checkForUpdatesAndNotify();
},
},
{
label: 'Open developer tools',
click: async () => {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,7 @@ electron-to-chromium@^1.4.284:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.328.tgz#b4565ffa502542b561cea16086d6d9b916c7095a"
integrity sha512-DE9tTy2PNmy1v55AZAO542ui+MLC2cvINMK4P2LXGsJdput/ThVG9t+QGecPuAZZSgC8XoI+Jh9M1OG9IoNSCw==

electron-updater@5.3.0:
electron-updater@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-5.3.0.tgz#3ba0d20407911a2edc5a68bee45c5aa2023e9ff8"
integrity sha512-iKEr7yQBcvnQUPnSDYGSWC9t0eF2YbZWeYYYZzYxdl+HiRejXFENjYMnYjoOm2zxyD6Cr2JTHZhp9pqxiXuCOw==
Expand Down

0 comments on commit d95bf8d

Please sign in to comment.