mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
fix alpha autoupdater logic to use correct config for latest
This commit is contained in:
@@ -55,6 +55,12 @@ const ALPHA_UPDATER_CONFIG: {
|
||||
provider: 's3',
|
||||
};
|
||||
|
||||
const GITHUB_UPDATER_CONFIG = {
|
||||
owner: 'jeffvli',
|
||||
provider: 'github' as const,
|
||||
repo: 'feishin',
|
||||
};
|
||||
|
||||
type UpdaterInstance = AppImageUpdater | MacUpdater | NsisUpdater | typeof autoUpdater;
|
||||
|
||||
class AppUpdater {
|
||||
@@ -97,6 +103,7 @@ async function checkAllChannelsAndGetBest(): Promise<{
|
||||
alphaUpdater.allowDowngrade = true;
|
||||
|
||||
try {
|
||||
console.log('Checking for updates on alpha channel');
|
||||
const alphaResult = await alphaUpdater.checkForUpdates();
|
||||
if (
|
||||
alphaResult?.updateInfo?.version &&
|
||||
@@ -111,7 +118,9 @@ async function checkAllChannelsAndGetBest(): Promise<{
|
||||
}
|
||||
|
||||
try {
|
||||
autoUpdater.setFeedURL(GITHUB_UPDATER_CONFIG);
|
||||
configureAutoUpdaterForChannel('latest');
|
||||
console.log('Checking for updates on latest channel (GitHub)');
|
||||
const latestResult = await autoUpdater.checkForUpdates();
|
||||
if (
|
||||
latestResult?.updateInfo?.version &&
|
||||
|
||||
Reference in New Issue
Block a user