From 974d8d4470be8a9ae6364f6a54bdcc00e9f21dfe Mon Sep 17 00:00:00 2001 From: mohandast52 Date: Wed, 29 May 2024 16:53:12 +0530 Subject: [PATCH 1/3] chore: Refactor electron/update.js for better readability --- electron/update.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/electron/update.js b/electron/update.js index d31153f2..512e3ca5 100644 --- a/electron/update.js +++ b/electron/update.js @@ -2,16 +2,11 @@ const { publishOptions } = require('./constants/publishOptions'); const electronUpdater = require('electron-updater'); const electronLogger = require('electron-log'); -const macUpdater = new electronUpdater.MacUpdater({ - ...publishOptions, - private: false, -}); +const macUpdater = new electronUpdater.MacUpdater({ ...publishOptions }); macUpdater.logger = electronLogger; -macUpdater.setFeedURL({ - ...publishOptions, -}); +macUpdater.setFeedURL({ ...publishOptions }); macUpdater.autoDownload = true; macUpdater.autoInstallOnAppQuit = true; From af77fbabeff17526f72173a057ae0a003aefa64d Mon Sep 17 00:00:00 2001 From: mohandast52 Date: Wed, 29 May 2024 17:08:05 +0530 Subject: [PATCH 2/3] chore: Update package.json with new ordering --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 61458279..af038e14 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,10 @@ { "author": "Valory AG", + "main": "electron/main.js", + "name": "olas-operate-app", + "productName": "Pearl", + "private": true, + "version": "0.1.0-rc26", "dependencies": { "@ant-design/cssinjs": "^1.18.4", "@ant-design/icons": "^5.3.0", @@ -36,10 +41,6 @@ "net": "^1.0.2", "prettier": "^3.2.5" }, - "main": "electron/main.js", - "name": "olas-operate-app", - "productName": "Pearl", - "private": true, "scripts": { "build:frontend": "cd frontend && yarn build && rm -rf ../electron/.next && cp -r .next ../electron/.next && rm -rf ../electron/public && cp -r public ../electron/public", "dev:backend": "poetry run python operate/cli.py", @@ -53,6 +54,5 @@ "test:frontend": "cd frontend && yarn test", "start": "electron .", "build": "rm -rf dist/ && electron-builder build" - }, - "version": "0.1.0-rc26" + } } From b8a978e75031534f15fcddfb9ecff2bb628729f3 Mon Sep 17 00:00:00 2001 From: mohandast52 Date: Wed, 29 May 2024 20:38:40 +0530 Subject: [PATCH 3/3] chore: Update .env.example and build.js for IS_STAGING variables --- .env.example | 3 ++- build.js | 8 ++++---- electron/constants/publishOptions.js | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 5f8e0789..f6a88375 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ FORK_URL= NODE_ENV= +DEV_RPC= STAKING_TEST_KEYS_PATH= -DEV_RPC= \ No newline at end of file +IS_STAGING= diff --git a/build.js b/build.js index 29e953fc..a5059c95 100644 --- a/build.js +++ b/build.js @@ -1,6 +1,6 @@ const dotenv = require('dotenv'); const build = require('electron-builder').build; -const {publishOptions} = require('./electron/constants/publishOptions'); +const { publishOptions } = require('./electron/constants/publishOptions'); dotenv.config(); @@ -24,7 +24,7 @@ const main = async () => { target: [ { target: 'default', - arch: ['x64','arm64'], + arch: ['x64', 'arm64'], }, ], publish: publishOptions, @@ -35,11 +35,11 @@ const main = async () => { entitlements: 'electron/entitlements.mac.plist', entitlementsInherit: 'electron/entitlements.mac.plist', notarize: { - teamId: process.env.APPLETEAMID + teamId: process.env.APPLETEAMID, }, }, }, }); }; -main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); \ No newline at end of file +main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); diff --git a/electron/constants/publishOptions.js b/electron/constants/publishOptions.js index 1ecbc1d4..3c57fb66 100644 --- a/electron/constants/publishOptions.js +++ b/electron/constants/publishOptions.js @@ -2,10 +2,11 @@ const publishOptions = { provider: 'github', owner: 'valory-xyz', repo: 'olas-operate-app', - releaseType: 'release', token: process.env.GH_TOKEN, private: false, publishAutoUpdate: true, + releaseType: process.env.IS_STAGING === 'true' ? 'prerelease' : 'release', + channel: process.env.IS_STAGING === 'true' ? 'alpha' : 'latest', }; module.exports = { publishOptions };