Skip to content

Commit

Permalink
check update: show unstable channel
Browse files Browse the repository at this point in the history
  • Loading branch information
yylyyl committed Dec 5, 2023
1 parent bdedbbe commit 7e2996c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/src/routes/System/updateStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const doBackgroundUpdateCheck = () => {
const latestInfo = resp1[channel];
if (!latestInfo) {
updateActions.setUpdate(null);
console.log("Cannot check update: channel not available");
return;
}
if (latestInfo.version !== currentVersion) {
Expand Down Expand Up @@ -114,6 +115,7 @@ export const manuallyCheck = (currentVersion) => {
const latestInfo = resp[channel];
if (!latestInfo) {
updateActions.setUpdate(null);
console.log("Cannot check update: channel not available");
return null;
}
if (latestInfo.version !== currentVersion) {
Expand All @@ -123,7 +125,7 @@ export const manuallyCheck = (currentVersion) => {
})
.catch(error => {
updateActions.setUpdate(null);
console.log("failed to check update: " + error.toString());
console.log("Cannot check update: " + error.toString());
});
};

Expand All @@ -139,6 +141,9 @@ export const getChannel = version => {
if (version === 'dev') {
return 'dev';
}
if (/^v\d+\.\d+\.\d+-unstable$/.test(version)) {
return 'unstable';
}
if (/^v\d+\.\d+\.\d+$/.test(version)) {
return 'stable';
}
Expand Down

0 comments on commit 7e2996c

Please sign in to comment.