Skip to content

Commit 2dcc986

Browse files
authored
Merge branch 'main' into dev
2 parents 8bd0534 + 1a6a944 commit 2dcc986

File tree

12 files changed

+1237
-10
lines changed

12 files changed

+1237
-10
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Thumbs.db
6060
.github
6161
.vscode
6262

63-
# Networks folders
64-
networks/
65-
!networks/betanet/project.yaml
66-
!networks/alphanet/project.yaml
67-
!networks/mainnet/project.yaml
63+
# Ignore all files and directories within the networks directory
64+
networks/*
65+
66+
# Allow only project.yaml files to be tracked under the networks directory
67+
!networks/*/project.yaml

build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ set -x
2121

2222
env | grep DB_
2323

24+
if [ -z $1 ]; then
25+
echo "Provide a network name (e.g. 'betanet', 'alphanet' or 'mainnet')"
26+
exit 1
27+
fi
28+
29+
sh ./scripts/prepare_folders.sh
30+
31+
cd ./networks/$1
32+
2433
# ----Installing Subql-Query----
2534
npm install -g @subql/query@1.6.0
2635

init.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ set -x
2121

2222
env | grep DB_
2323

24+
if [ -z $1 ]; then
25+
echo "Provide a network name (e.g. 'betanet', 'alphanet' or 'mainnet')"
26+
exit 1
27+
fi
28+
29+
sh ./scripts/prepare_folders.sh
30+
31+
cd ./networks/$1
32+
2433
# ----Installing Subql-Node----
2534
npm install -g @subql/node@1.16.0
2635

@@ -33,9 +42,9 @@ npm run codegen
3342
# ----Building Ternoa-Subql----
3443
npm run build
3544

36-
ADDITIONAL_FLAGS="${@:1}" # Add any additional arguments passed in
45+
ADDITIONAL_FLAGS="${@:2}" # Add any additional arguments passed in
3746
if [ -n "$ADDITIONAL_FLAGS" ]; then
3847
subql-node -f . --disable-historical=true --db-schema=subql_ternoa --timeout="$TIMEOUT" "$ADDITIONAL_FLAGS"
3948
else
4049
subql-node -f . --disable-historical=true --db-schema=subql_ternoa --timeout="$TIMEOUT"
41-
fi
50+
fi

local-runner.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SCRIPT_PATH=$(dirname "$0")
2+
3+
cd ${SCRIPT_PATH}
4+
5+
if [ -z $1 ]; then
6+
echo "Provide a path (e.g. '.')"
7+
exit 1
8+
fi
9+
10+
docker rm -f $(docker-compose ps -a -q)
11+
rm -rf .data/
12+
rm -rf dist/
13+
yarn install --immutable --immutable-cache --check-cache
14+
yarn codegen
15+
yarn build
16+
yarn start:docker

0 commit comments

Comments
 (0)