Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/ env vars electron #266

Merged
merged 8 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- run: yarn install-deps
- name: "Build frontend with env vars"
run: yarn build:frontend
env:
env:
NODE_ENV: production
DEV_RPC: https://rpc-gate.autonolas.tech/gnosis-rpc/
IS_STAGING: ${{ github.ref != 'refs/heads/main' && 'true' || 'false' }}
Expand Down Expand Up @@ -121,4 +121,7 @@ jobs:
NODE_ENV: development
DEV_RPC: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
FORK_URL: https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b
run: node build.js
run: |
echo "DEV_RPC=https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b" >> .env
echo -e "FORK_URL=https://virtual.gnosis.rpc.tenderly.co/78ca845d-2b24-44a6-9ce2-869a979e8b5b" >> .env
node build.js
4 changes: 4 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const main = async () => {
to: 'bins',
filter: ['**/*'],
},
{
from: '.env',
to: '.env'
},
],
cscKeyPassword: process.env.CSC_KEY_PASSWORD,
cscLink: process.env.CSC_LINK,
Expand Down
12 changes: 11 additions & 1 deletion electron/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ const { paths } = require('./constants');
* - use "" (nothing as a suffix) for latest release candidate, for example "0.1.0rc26"
* - use "alpha" for alpha release, for example "0.1.0rc26-alpha"
*/
const OlasMiddlewareVersion = '0.1.0rc97';
const OlasMiddlewareVersion = '0.1.0rc105';

const path = require('path');
const { app } = require('electron');

// load env vars
require('dotenv').config({
path: app.isPackaged
? path.join(process.resourcesPath, '.env')
: path.resolve(process.cwd(), '.env'),
});

const Env = {
...process.env,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
"test:frontend": "cd frontend && yarn test",
"download-binaries": "sh download_binaries.sh"
},
"version": "0.1.0-rc97"
"version": "0.1.0-rc105"
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "olas-operate-middleware"
version = "0.1.0-rc97"
version = "0.1.0-rc105"
description = ""
authors = ["David Vilela <[email protected]>", "Viraj Patel <[email protected]>"]
readme = "README.md"
Expand Down
Loading