mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +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',
|
provider: 's3',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const GITHUB_UPDATER_CONFIG = {
|
||||||
|
owner: 'jeffvli',
|
||||||
|
provider: 'github' as const,
|
||||||
|
repo: 'feishin',
|
||||||
|
};
|
||||||
|
|
||||||
type UpdaterInstance = AppImageUpdater | MacUpdater | NsisUpdater | typeof autoUpdater;
|
type UpdaterInstance = AppImageUpdater | MacUpdater | NsisUpdater | typeof autoUpdater;
|
||||||
|
|
||||||
class AppUpdater {
|
class AppUpdater {
|
||||||
@@ -97,6 +103,7 @@ async function checkAllChannelsAndGetBest(): Promise<{
|
|||||||
alphaUpdater.allowDowngrade = true;
|
alphaUpdater.allowDowngrade = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
console.log('Checking for updates on alpha channel');
|
||||||
const alphaResult = await alphaUpdater.checkForUpdates();
|
const alphaResult = await alphaUpdater.checkForUpdates();
|
||||||
if (
|
if (
|
||||||
alphaResult?.updateInfo?.version &&
|
alphaResult?.updateInfo?.version &&
|
||||||
@@ -111,7 +118,9 @@ async function checkAllChannelsAndGetBest(): Promise<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
autoUpdater.setFeedURL(GITHUB_UPDATER_CONFIG);
|
||||||
configureAutoUpdaterForChannel('latest');
|
configureAutoUpdaterForChannel('latest');
|
||||||
|
console.log('Checking for updates on latest channel (GitHub)');
|
||||||
const latestResult = await autoUpdater.checkForUpdates();
|
const latestResult = await autoUpdater.checkForUpdates();
|
||||||
if (
|
if (
|
||||||
latestResult?.updateInfo?.version &&
|
latestResult?.updateInfo?.version &&
|
||||||
|
|||||||
Reference in New Issue
Block a user