From ee0db5afeb7abfc6733a264f6ad13cba6a1398bb Mon Sep 17 00:00:00 2001 From: sarthak_dev Date: Tue, 23 Jul 2024 20:07:27 +0530 Subject: [PATCH 1/3] add download binaries script --- download_binaries.sh | 8 ++++++++ package.json | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100755 download_binaries.sh diff --git a/download_binaries.sh b/download_binaries.sh new file mode 100755 index 000000000..eb40216d8 --- /dev/null +++ b/download_binaries.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +ARCH=$1 +BIN_DIR="electron/bins/" +mkdir -p $BIN_DIR + +trader_version=$(poetry run python -c "import yaml; config = yaml.safe_load(open('templates/trader.yaml')); print(config['configuration']['trader_version'])") +curl -L -o "${BIN_DIR}aea_bin" "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${ARCH}" diff --git a/package.json b/package.json index e41167849..fa7de32dc 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "productName": "Pearl", "description": "An all-in-one application designed to streamline your entry into the world of autonomous agents and earning OLAS through staking.", "scripts": { - "build": "rm -rf dist/ && node build.tester.js", "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", "dev:frontend": "cd frontend && yarn dev", @@ -52,9 +51,10 @@ "install:backend": "poetry install --no-root", "install:frontend": "cd frontend && yarn", "lint:frontend": "cd frontend && yarn lint", - "start": "electron .", + "start": "dotenv -e .env -- yarn electron .", "start:frontend": "cd frontend && yarn start", - "test:frontend": "cd frontend && yarn test" + "test:frontend": "cd frontend && yarn test", + "download-binaries": "sh download_binaries.sh x64" }, "version": "0.1.0-rc71" } From 9be7b1fcb3e5346d92cae1c0aeab16f6c1796635 Mon Sep 17 00:00:00 2001 From: SarthakDev12 Date: Wed, 24 Jul 2024 19:50:43 +0530 Subject: [PATCH 2/3] make requested changes --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index fa7de32dc..2c75d489c 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,8 @@ "install:backend": "poetry install --no-root", "install:frontend": "cd frontend && yarn", "lint:frontend": "cd frontend && yarn lint", - "start": "dotenv -e .env -- yarn electron .", + "start": "yarn electron .", + "dev": "dotenv -e .env -- yarn start", "start:frontend": "cd frontend && yarn start", "test:frontend": "cd frontend && yarn test", "download-binaries": "sh download_binaries.sh x64" From 66b0943d62cab0de5b7318c1c703fda4e9934f69 Mon Sep 17 00:00:00 2001 From: SarthakDev12 Date: Thu, 25 Jul 2024 16:14:31 +0530 Subject: [PATCH 3/3] add both variant x64 and arm64 in script --- download_binaries.sh | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/download_binaries.sh b/download_binaries.sh index eb40216d8..db12c6223 100755 --- a/download_binaries.sh +++ b/download_binaries.sh @@ -1,8 +1,10 @@ #!/bin/bash -ARCH=$1 BIN_DIR="electron/bins/" mkdir -p $BIN_DIR trader_version=$(poetry run python -c "import yaml; config = yaml.safe_load(open('templates/trader.yaml')); print(config['configuration']['trader_version'])") -curl -L -o "${BIN_DIR}aea_bin" "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${ARCH}" + +curl -L -o "${BIN_DIR}aea_bin_x64" "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_x64" + +curl -L -o "${BIN_DIR}aea_bin_arm64" "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_arm64" diff --git a/package.json b/package.json index 2c75d489c..b116e7068 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "dev": "dotenv -e .env -- yarn start", "start:frontend": "cd frontend && yarn start", "test:frontend": "cd frontend && yarn test", - "download-binaries": "sh download_binaries.sh x64" + "download-binaries": "sh download_binaries.sh" }, "version": "0.1.0-rc71" }