sonr/Taskfile.yml

135 lines
2.9 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: https://tasks.sonr.dev/Hway.yml
ipfs:
taskfile: https://tasks.sonr.dev/IPFS.yml
sonrd:
taskfile: https://tasks.sonr.dev/Sonrd.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}}
issue:list:
desc: List all issues
silent: true
cmds:
- gh ils
issue:new:
desc: Create a new issue
silent: true
dir: .github/scripts
cmds:
- sh new_issue.sh
gen:proto:
desc: Generate proto files
silent: true
cmd: gum spin --spinner dot --title "Generating Protobufs..." -- make proto-gen
gen:sqlc:
desc: Generate SQLC files
silent: true
cmds:
- gum spin --spinner dot --title "Generating SQLC..." -- sqlc generate -f internal/database/sqlc.yaml
gen:templ:
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