Skip to content

Commit 75b5fda

Browse files
committed
fix: added build script, docs url changes to python servers and auto-update logic fixes for beta releases
1 parent 0cfd0ef commit 75b5fda

11 files changed

Lines changed: 293 additions & 201 deletions

File tree

src/interface/main/index.js

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,27 +470,49 @@ const initializeAppServer = async () => {
470470
* @async
471471
* @returns {Promise<void>}
472472
*/
473+
473474
const checkForUpdates = async () => {
474-
const betaUserStatus = await getBetaUserStatusFromKeytar()
475+
/**
476+
* Indicates whether the current user is a beta user.
477+
* If true, the application will check for pre-release (beta) updates.
478+
* If false, the application will check for stable updates.
479+
*/
480+
const betaUserStatus = true
475481

476-
// Set autoUpdater feed URL based on beta user status
477482
if (betaUserStatus) {
483+
// Configure autoUpdater to check for pre-release updates if the user is a beta user.
478484
autoUpdater.setFeedURL({
479-
provider: "github",
480-
owner: "existence-master",
481-
repo: "Sentient-Beta-Releases"
485+
provider: "github", // Specify the update provider as GitHub
486+
owner: "existence-master", // The owner of the GitHub repository
487+
repo: "Sentient" // The name of the GitHub repository
482488
})
489+
490+
/**
491+
* Allows autoUpdater to check for and download pre-release versions (e.g., beta, alpha).
492+
* This is set to true for beta users to receive beta updates.
493+
*/
494+
autoUpdater.allowPrerelease = true
483495
} else {
496+
// Configure autoUpdater to check for stable releases if the user is not a beta user.
484497
autoUpdater.setFeedURL({
485-
provider: "github",
486-
owner: "existence-master",
487-
repo: "Sentient-Releases"
498+
provider: "github", // Specify the update provider as GitHub
499+
owner: "existence-master", // The owner of the GitHub repository
500+
repo: "Sentient" // The name of the GitHub repository
488501
})
502+
// autoUpdater.allowPrerelease is not set here, which defaults to false, ensuring only stable releases are checked.
489503
}
490504

491-
createAppWindow() // Create the main application window
492-
493-
// autoUpdater.checkForUpdatesAndNotify() // Check for updates and notify user (currently disabled)
505+
/**
506+
* Creates the main application window.
507+
* This should be called after setting up the update feed to ensure the app window is ready regardless of update status.
508+
*/
509+
createAppWindow()
510+
511+
/**
512+
* Initiates the update check process and notifies the user if an update is available.
513+
* This asynchronous call checks for updates based on the configured feed URL and displays a notification to the user.
514+
*/
515+
autoUpdater.checkForUpdatesAndNotify()
494516
}
495517

496518
/**

src/interface/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"type": "module",
1010
"scripts": {
1111
"dev": "concurrently -n \"NEXT,ELECTRON\" -c \"yellow,blue\" --kill-others \"next dev\" \"electron .\"",
12+
"build": "next build && electron-builder -c electron-builder.yml -p always",
1213
"lint": "eslint .",
1314
"format": "prettier --check .",
1415
"format:fix": "prettier --write ."

0 commit comments

Comments
 (0)