mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-11-26 14:57:42 +03:00
Fixed versions comparison
This commit is contained in:
parent
ca2f43ebf0
commit
8d1543f0ae
2 changed files with 6 additions and 2 deletions
|
@ -39,6 +39,7 @@
|
|||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/semver": "^7.3.9",
|
||||
"@types/discord-rpc": "^4.0.0",
|
||||
"electron": "^14.0.0",
|
||||
"electron-builder": "^22.13.1",
|
||||
|
@ -49,6 +50,7 @@
|
|||
"cash-dom": "^8.1.0",
|
||||
"discord-rpc": "^4.0.1",
|
||||
"electron-store": "^8.0.1",
|
||||
"follow-redirects": "^1.14.4"
|
||||
"follow-redirects": "^1.14.4",
|
||||
"semver": "^7.3.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ const fs = require('fs');
|
|||
const { exec } = require('child_process');
|
||||
const { ipcRenderer } = require('electron');
|
||||
|
||||
const semver = require('semver');
|
||||
|
||||
import $ from 'cash-dom';
|
||||
|
||||
import { Genshinlib } from './lib/Genshinlib';
|
||||
|
@ -100,7 +102,7 @@ $(() => {
|
|||
});
|
||||
|
||||
Tools.getGitTags('https://notabug.org/nobody/an-anime-game-launcher').then (tags => {
|
||||
if (tags.filter(entry => entry.tag > launcher_version).length > 0)
|
||||
if (tags.filter(entry => semver.gt(entry.tag, launcher_version)).length > 0)
|
||||
{
|
||||
ipcRenderer.send('notification', {
|
||||
title: `Launcher update available (${launcher_version} -> ${tags[tags.length - 1].tag})`,
|
||||
|
|
Loading…
Reference in a new issue