sonr/Taskfile.yml
Prad Nukala 47c3a53080
refactor/internal (#1216)
* refactor: update import paths in gateway handlers

* refactor: remove obsolete devtools Makefile and README

* build: optimize build process for improved efficiency

* refactor: remove obsolete pkl files related to Matrix and Sonr network configurations

* refactor: move embed code to x/dwn/types
2024-12-24 16:10:20 +00:00

145 lines
3.2 KiB
YAML

version: "3"
vars:
VERSION:
sh: git describe --tags --abbrev=0
COMMIT:
sh: git rev-parse --short HEAD
ROOT:
sh: git rev-parse --show-toplevel
OS:
sh: uname -s
TASKS:
sh: task -l
DOPPLER_TOKEN:
sh: skate get DOPPLER_NETWORK
includes:
hway:
taskfile: .taskfiles/Hway.yml
ipfs:
taskfile: .taskfiles/IPFS.yml
postgres:
taskfile: .taskfiles/Postgres.yml
sonrd:
taskfile: .taskfiles/Sonrd.yml
synapse:
taskfile: .taskfiles/Synapse.yml
tigerbeetle:
taskfile: .taskfiles/TigerBeetle.yml
tasks:
default:
cmds:
- gh run ls -L 3
- gum format -- "# Sonr ({{.OS}}-{{.VERSION}})" " - ({{.COMMIT}}) {{.ROOT}}"
- task -l -j | jq -r '.tasks[].name' | fzf --height=16 | xargs task
silent: true
deps:
desc: Install go dependencies
silent: true
vars:
DEPS:
[
"github.com/apple/pkl-go/cmd/pkl-gen-go@latest",
"github.com/sqlc-dev/sqlc/cmd/sqlc@latest",
"github.com/goreleaser/goreleaser/v2@latest",
"github.com/a-h/templ/cmd/templ@latest",
]
cmds:
- for: { var: DEPS }
cmd: gum spin --spinner dot --title "Installing go dependencies..." -- go install {{.ITEM}}
new-issue:
desc: Create a new issue
silent: true
dir: .github/scripts
cmds:
- sh new_issue.sh
pkl-gen:
desc: Generate PKL files
silent: true
dir: "pkl/sonr.net"
vars:
FILES: ["Hway.pkl", "Motr.pkl", "UCAN.pkl"]
cmds:
- for: { var: FILES }
cmd: gum spin --spinner dot --title "Generating PKL in Go..." -- pkl-gen-go {{.ITEM}}
proto-gen:
desc: Generate proto files
silent: true
cmd: gum spin --spinner dot --title "Generating Protobufs..." -- make proto-gen
sqlc-gen:
desc: Generate SQLC files
silent: true
cmds:
- gum spin --spinner dot --title "Generating SQLC..." -- sqlc generate -f internal/database/sqlc.yaml
templ-gen:
desc: Generate templ files
silent: true
cmd: gum spin --spinner dot --title "Generating Templ..." -- templ generate
start:
desc: Start the Network
silent: true
cmds:
- task: postgres:reset
- task: ipfs:init
- task: ipfs:mount
- task: sonrd:install
- task: hway:build
- task: procs-up
status:
desc: Check the status of the Network
silent: true
cmds:
- task: procs-attach
stop:
desc: Stop the Network
silent: true
cmds:
- task: procs-down
procs-up:
internal: true
dir: "deploy"
cmds:
- cmd: process-compose up
platforms:
- darwin
- cmd: process-compose up --use-uds --unix-socket /tmp/sonr-network.sock -D
platforms:
- linux
procs-down:
internal: true
dir: "deploy"
cmds:
- cmd: process-compose down
platforms:
- darwin
- cmd: process-compose down --use-uds --unix-socket /tmp/sonr-network.sock
platforms:
- linux
procs-attach:
internal: true
dir: "deploy"
cmds:
- cmd: process-compose attach --use-uds --unix-socket /tmp/sonr-network.sock
platforms:
- linux
- cmd: process-compose attach
platforms:
- darwin