Skip to content

Commit 3f354d0

Browse files
authoredAug 12, 2024··
Script for building middleware binary locally (#250)
* add script for building middleware binaries locally * add valory header
1 parent deddd89 commit 3f354d0

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed
 

‎build_pearl.sh

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
# ------------------------------------------------------------------------------
4+
#
5+
# Copyright 2023-2024 Valory AG
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
# ------------------------------------------------------------------------------
20+
21+
cd "$(dirname "$0")"
22+
23+
BIN_DIR="electron/bins/"
24+
mkdir -p $BIN_DIR
25+
26+
poetry install
27+
28+
poetry run pyinstaller operate/services/utils/tendermint.py --onefile --distpath $BIN_DIR
29+
30+
poetry run pyinstaller \
31+
--collect-data eth_account \
32+
--collect-all aea \
33+
--collect-all autonomy \
34+
--collect-all operate \
35+
--collect-all aea_ledger_ethereum \
36+
--collect-all aea_ledger_cosmos \
37+
--collect-all aea_ledger_ethereum_flashbots \
38+
--hidden-import aea_ledger_ethereum \
39+
--hidden-import aea_ledger_cosmos \
40+
--hidden-import aea_ledger_ethereum_flashbots \
41+
operate/pearl.py \
42+
--add-binary ${BIN_DIR}/aea_bin_x64:. \
43+
--add-binary ${BIN_DIR}/aea_bin_arm64:. \
44+
--onefile \
45+
--distpath $BIN_DIR \
46+
--name pearl_$(uname -m)
47+

‎package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
"dev": "dotenv -e .env -- yarn start",
5656
"start:frontend": "cd frontend && yarn start",
5757
"test:frontend": "cd frontend && yarn test",
58-
"download-binaries": "sh download_binaries.sh"
58+
"download-binaries": "sh download_binaries.sh",
59+
"build:pearl": "sh build_pearl.sh"
60+
5961
},
6062
"version": "0.1.0-rc105"
6163
}

0 commit comments

Comments
 (0)
Please sign in to comment.