#587 enable force updating (#591)

Co-authored-by: neil molina <neil@neils-MacBook-Pro.local>
This commit is contained in:
Neil 2023-05-11 12:13:18 +08:00 committed by GitHub
parent f0796852a4
commit 84339660c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -110,10 +110,13 @@ autoUpdater.on("update-downloaded", (info) => {
});
export const isDev = () => fs.existsSync(path.join(getTeaPath(), "tea.xyz/gui/dev"));
export const isForceUpdate = () =>
fs.existsSync(path.join(getTeaPath(), "tea.xyz/gui/force-auto-update"));
async function setPublishURL() {
try {
const feedUrl = `https://gui.tea.xyz/${isDev() ? "dev" : "release"}`;
const folder = isForceUpdate() ? "auto-update-test" : isDev() ? "dev" : "release";
const feedUrl = `https://gui.tea.xyz/${folder}`;
log.info(`feedUrl$: ${feedUrl}`);
autoUpdater.setFeedURL(feedUrl);
} catch (error) {

View file

@ -1,6 +1,6 @@
{
"name": "tea",
"version": "0.2.3",
"version": "0.2.4",
"private": true,
"description": "tea gui app",
"author": "tea.xyz",