Skip to content

Commit

Permalink
Merge pull request #155 from valory-xyz/staging
Browse files Browse the repository at this point in the history
feat: Staging release setup
  • Loading branch information
mohandast52 authored May 29, 2024
2 parents 6217b24 + b582f3f commit a7e6f48
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FORK_URL=
NODE_ENV=
DEV_RPC=
STAKING_TEST_KEYS_PATH=
DEV_RPC=
IS_STAGING=
8 changes: 4 additions & 4 deletions build.js
Original file line number Diff line number Diff line change
@@ -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();

Expand All @@ -24,7 +24,7 @@ const main = async () => {
target: [
{
target: 'default',
arch: ['x64','arm64'],
arch: ['x64', 'arm64'],
},
],
publish: publishOptions,
Expand All @@ -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));
main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e));
3 changes: 2 additions & 1 deletion electron/constants/publishOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
9 changes: 2 additions & 7 deletions electron/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -53,6 +54,5 @@
"test:frontend": "cd frontend && yarn test",
"start": "electron .",
"build": "rm -rf dist/ && electron-builder build"
},
"version": "0.1.0-rc26"
}
}

0 comments on commit a7e6f48

Please sign in to comment.