Merge pull request #580 from Zagrios/feature/fix-version-issue

Feature/fix version issue
This commit is contained in:
MathieuG-P
2024-09-19 13:56:48 +02:00
committed by GitHub
2 changed files with 12 additions and 0 deletions
@@ -104,6 +104,10 @@ export class AutoUpdaterService {
}
public async showChangelog(version:string): Promise<void>{
if (version.toLowerCase().includes("alpha")) {
throw new Error("Alpha version, skipping changelog");
}
const changelog = await this.getChangelogVersion(version);
this.modal.openModal(ChangelogModal, {data: changelog});
+8
View File
@@ -53,6 +53,14 @@ export default function App() {
const appVersion = await lastValueFrom(autoUpdater.getAppVersion());
const lastAppVersion = autoUpdater.getLastAppVersion();
if (lastAppVersion.toLowerCase().includes("alpha")) {
autoUpdater.setLastAppVersion("0"); // Reset last app version if it's an alpha version for users with alpha versions in the var stored.
}
if (appVersion.toLowerCase().includes("alpha")) {
return;
}
autoUpdater.setLastAppVersion(appVersion);
if (parse(lastAppVersion) && gt(appVersion, lastAppVersion)) {