desktop: ready beta for deployment

This commit is contained in:
Abdullah Atta
2024-01-31 14:31:42 +05:00
parent e1f07618d3
commit 8f379d253e
8 changed files with 22 additions and 14 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@notesnook/desktop",
"version": "2.6.17",
"version": "3.0.0-beta",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@notesnook/desktop",
"version": "2.6.17",
"version": "3.0.0-beta",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {

View File

@@ -2,7 +2,7 @@
"name": "@notesnook/desktop",
"productName": "Notesnook",
"description": "Your private note taking space",
"version": "2.6.17",
"version": "3.0.0-beta",
"appAppleId": "1544027013",
"private": true,
"main": "./dist/index.js",
@@ -56,6 +56,7 @@
"artifactName": "notesnook_${os}_${arch}.${ext}",
"npmRebuild": false,
"asar": false,
"generateUpdatesFilesForAllChannels": true,
"files": [
"!*.chunk.js.map",
"!*.chunk.js.LICENSE.txt",

View File

@@ -19,16 +19,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { autoUpdater } from "electron-updater";
import { config } from "./config";
import { version } from "../../package.json";
const CHANNEL = version.endsWith("-beta") ? "beta" : "latest";
async function configureAutoUpdater() {
autoUpdater.setFeedURL({
provider: "generic",
url: `https://notesnook.com/releases/${process.platform}/`,
useMultipleRangeRequest: false
useMultipleRangeRequest: false,
channel: CHANNEL,
requestHeaders: {
RELEASE_CHANNEL: CHANNEL
}
});
autoUpdater.autoDownload = config.automaticUpdates;
autoUpdater.allowDowngrade = false;
autoUpdater.allowDowngrade = CHANNEL === "beta";
autoUpdater.allowPrerelease = false;
autoUpdater.autoInstallOnAppQuit = true;
}