mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
77 lines
1.8 KiB
YAML
77 lines
1.8 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
|
|
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
|
|
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
|
|
|
|
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
|
|
|
|
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
|