-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathprep-all.sh
More file actions
executable file
·60 lines (48 loc) · 2.39 KB
/
prep-all.sh
File metadata and controls
executable file
·60 lines (48 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Set strict error handling
set -euxo pipefail
echo "Starting project setup..."
# Environment variables that need to be set (commented out as reference)
# export CI_DEPLOY_SEPOLIA_RPC_URL=""
# export CI_FORK_SEPOLIA_DEPLOYER_ADDRESS=""
# export CI_FORK_SEPOLIA_BLOCK_NUMBER=""
# export CI_DEPLOY_POLYGON_RPC_URL=""
# export CI_SEPOLIA_METABOARD_URL=""
# export RPC_URL_ETHEREUM_FORK=""
# export COMMIT_SHA=""
# Keep environment variables when using nix-develop
keep=(
-k CI_DEPLOY_SEPOLIA_RPC_URL
-k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS
-k CI_FORK_SEPOLIA_BLOCK_NUMBER
-k CI_DEPLOY_POLYGON_RPC_URL
-k CI_SEPOLIA_METABOARD_URL
-k RPC_URL_ETHEREUM_FORK
-k COMMIT_SHA
-k PUBLIC_WALLETCONNECT_PROJECT_ID
)
echo "Preparing base setup..."
./prep-base.sh
echo "Setting up UI components..."
nix develop -i ${keep[@]} -c ob-ui-components-prelude
echo "Building packages..."
nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)'
nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/ui-components && npm run build -w @rainlanguage/webapp)'
# Temporarily disable command echoing
set +x
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Print the completion message
printf "\033[0;32m" # Set text to green
printf "╔════════════════════════════════════════════════════════════════════════╗\n"
printf "║ Setup Complete! ║\n"
printf "╠════════════════════════════════════════════════════════════════════════╣\n"
printf "║ How to run the app: ║\n"
printf "║ ║\n"
printf "║ To run webapp: cd packages/webapp && nix develop -c npm run dev ║\n"
printf "╚════════════════════════════════════════════════════════════════════════╝\n"
printf "\033[0m" # Reset text color
# Re-enable command echoing
set -x