Skip to content

Commit ce1ba44

Browse files
committed
fix autoupdater, change version format
1 parent 5df2d5b commit ce1ba44

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

electron-builder.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protocols:
1818
win:
1919
executableName: solidtime
2020
nsis:
21-
artifactName: ${name}-${version}-setup.${ext}
21+
artifactName: ${name}-setup.${ext}
2222
shortcutName: ${productName}
2323
uninstallDisplayName: ${productName}
2424
createDesktopShortcut: always
@@ -36,7 +36,7 @@ mac:
3636
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
3737
notarize: true
3838
dmg:
39-
artifactName: ${name}-${version}-${arch}.${ext}
39+
artifactName: ${name}-${arch}.${ext}
4040
linux:
4141
target:
4242
- deb
@@ -52,7 +52,7 @@ linux:
5252
mimeTypes:
5353
- x-scheme-handler/solidtime
5454
appImage:
55-
artifactName: ${name}-${version}.${ext}
55+
artifactName: ${name}.${ext}
5656
npmRebuild: false
5757
publish:
5858
provider: github

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "solidtime",
3-
"version": "0.0.25",
3+
"version": "0.0.26",
44
"description": "Desktop App for solidtime - the modern open-source time tracker",
55
"main": "./out/main/index.js",
66
"author": "solidtime.io",

src/main/autoUpdater.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ipcMain } from 'electron'
1+
import { ipcMain, app } from 'electron'
22
import type { AppUpdater } from 'electron-updater'
33
import electronUpdater from 'electron-updater'
44
import log from 'electron-log'
@@ -29,7 +29,10 @@ export function registerAutoUpdateListeners(mainWindow: Electron.BrowserWindow)
2929
})
3030

3131
getAutoUpdater().addListener('update-downloaded', () => {
32+
app.emit('before-quit');
33+
setTimeout(() => {
3234
getAutoUpdater().quitAndInstall()
35+
}, 500);
3336
})
3437

3538
getAutoUpdater().addListener('error', (error) => {

0 commit comments

Comments
 (0)