Fix/hway db driver (#1198)

* fix/hway-db-driver

* fix/hway-db-driver

* chore(scripts): add tx indexer and psql connection to test

* fix(scripts): make testnet setup more robust and configurable
This commit is contained in:
Prad Nukala
2024-12-19 11:22:44 +00:00
committed by GitHub
parent 36191d2bd4
commit 9d86dad38d
20 changed files with 439 additions and 374 deletions
+64 -18
View File
@@ -1,4 +1,4 @@
version: '3'
version: "3"
vars:
VERSION:
@@ -11,20 +11,13 @@ vars:
sh: uname -s
TASKS:
sh: task -l
DOPPLER_TOKEN:
sh: skate get DOPPLER_NETWORK
tasks:
default:
cmds:
- gh run ls -L 3
- gum format -- "# Sonr ({{.OS}}-{{.VERSION}})" "({{.COMMIT}}) {{.ROOT_DIR}}" "### {{ .TASKS }}"
silent: true
clean:
desc: Clean build artifacts
cmds:
- sh ./scripts/init_env.sh
- rm -rf ./build
- rm -rf ./dist
- rm -rf ./static
- gum format -- "# Sonr ({{.OS}}-{{.VERSION}})" "({{.COMMIT}}) {{.ROOT_DIR}}" "### {{ .TASKS }}"
silent: true
build:
@@ -38,6 +31,21 @@ tasks:
- task: build:sonr
- task: build:hway
start:
desc: Start the node
silent: true
cmds:
- task: build:hway
- task: start:darwin
- task: start:linux
stop:
desc: Stop the node
silent: true
cmds:
- task: stop:darwin
- task: stop:linux
build:motr:
internal: true
silent: true
@@ -62,15 +70,53 @@ tasks:
- sudo -u postgres psql -f ./deploy/sink/db_seed.sql
- sudo -u postgres psql -d chainindex -f ./deploy/sink/schema_indexer.sql
reset:db:
desc: Reset the database
silent: true
platforms:
- linux
cmd: gum confirm "Reset chainindex, highway, and matrixhs?" --default=false --affirmative "Yes" && sudo -u postgres psql -f ./deploy/sink/db_reset.sql|| echo "No selected"
init:ipfs:
desc: Initialize the ipfs node
silent: true
cmds:
- sh ./scripts/ipfs_config.sh
start:darwin:
internal: true
silent: true
platforms:
- darwin
cmd: make start
start:linux:
internal: true
silent: true
platforms:
- linux
cmd: make start-uds
stop:darwin:
internal: true
silent: true
platforms:
- darwin
cmd: make stop
stop:linux:
internal: true
silent: true
platforms:
- linux
cmds:
- make stop-uds
- task: reset:chainindex
clean:
internal: true
cmds:
- sh ./scripts/init_env.sh
- rm -rf ./build
- rm -rf ./dist
- rm -rf ./static
silent: true
reset:chainindex:
internal: true
platforms:
- linux
cmd: sudo -u postgres psql -f ./deploy/sink/reset_chainindex.sql