Skip to content

Commit

Permalink
update for demo site
Browse files Browse the repository at this point in the history
  • Loading branch information
yylyyl committed Nov 9, 2023
1 parent f429db0 commit f90f45a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions web/src/routes/System/updateStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,21 @@ const checkNow = ab => {
}
updateActions.setChecking();

if (process.env.REACT_APP_CONTAINERUP_DEMO) {
return new Promise((resolve) => {
setTimeout(() => {
resolve({
demo: {
version: process.env.REACT_APP_CONTAINERUP_VERSION + '-new',
image: 'quay.io/containerup/demo:latest',
changelog: 'This is for demo only!\nNo real update will be performed!',
compatible_version: 'v0.1.0'
}
});
}, 1000);
});
}

return dataModel.systemCheckUpdate(ab);
};

Expand Down Expand Up @@ -118,6 +133,9 @@ export const getChannel = version => {
if (forceChannel) {
return forceChannel;
}
if (process.env.REACT_APP_CONTAINERUP_DEMO) {
return 'demo';
}
if (version === 'dev') {
return 'dev';
}
Expand Down

0 comments on commit f90f45a

Please sign in to comment.