sonr/Taskfile.yml
Prad Nukala 9d86dad38d
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
2024-12-19 11:22:44 +00:00

123 lines
2.4 KiB
YAML

version: "3"
vars:
VERSION:
sh: git describe --tags --abbrev=0
COMMIT:
sh: git rev-parse --short HEAD
ROOT_DIR:
sh: git rev-parse --show-toplevel
OS:
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
build:
desc: Build all binaries
silent: true
cmds:
- task: clean
- mkdir -p ./build
- mkdir -p ./static/wasm
- task: build:motr
- 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
cmd: goreleaser build --snapshot --id motr --clean -o ./static/wasm/app.wasm
build:sonr:
internal: true
silent: true
cmd: goreleaser build --snapshot --id sonr --single-target --clean -o ./build/sonrd
build:hway:
internal: true
silent: true
cmd: goreleaser build --snapshot --id hway --single-target --clean -o ./build/hway
init:db:
desc: Initialize the database
silent: true
platforms:
- linux
cmds:
- sudo -u postgres psql -f ./deploy/sink/db_seed.sql
- sudo -u postgres psql -d chainindex -f ./deploy/sink/schema_indexer.sql
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