Files
sonr/Taskfile.yml
T

135 lines
2.9 KiB
YAML
Raw Normal View History

2024-12-19 06:22:44 -05:00
version: "3"
2024-12-18 15:53:45 -05:00
vars:
VERSION:
sh: git describe --tags --abbrev=0
COMMIT:
sh: git rev-parse --short HEAD
2024-12-22 17:01:11 -05:00
ROOT:
2024-12-18 15:53:45 -05:00
sh: git rev-parse --show-toplevel
2024-12-19 00:48:42 +00:00
OS:
sh: uname -s
TASKS:
sh: task -l
2024-12-19 06:22:44 -05:00
DOPPLER_TOKEN:
sh: skate get DOPPLER_NETWORK
2024-12-22 17:01:11 -05:00
includes:
hway:
taskfile: taskfiles/Hway.yml
2024-12-22 17:01:11 -05:00
ipfs:
taskfile: taskfiles/IPFS.yml
2024-12-22 17:01:11 -05:00
sonrd:
taskfile: taskfiles/Sonrd.yml
2024-12-22 17:01:11 -05:00
2024-12-18 15:53:45 -05:00
tasks:
default:
cmds:
2024-12-19 00:48:42 +00:00
- gh run ls -L 3
2024-12-22 17:01:11 -05:00
- gum format -- "# Sonr ({{.OS}}-{{.VERSION}})" " - ({{.COMMIT}}) {{.ROOT}}"
- task -l -j | jq -r '.tasks[].name' | fzf --height=16 | xargs task
2024-12-18 15:53:45 -05:00
silent: true
2024-12-22 17:01:11 -05:00
deps:
desc: Install go dependencies
2024-12-18 15:53:45 -05:00
silent: true
2024-12-22 17:01:11 -05:00
vars:
2024-12-22 18:43:30 -05:00
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",
]
2024-12-19 00:48:42 +00:00
cmds:
2024-12-22 17:01:11 -05:00
- for: { var: DEPS }
cmd: gum spin --spinner dot --title "Installing go dependencies..." -- go install {{.ITEM}}
2024-12-19 00:48:42 +00:00
issue:list:
desc: List all issues
silent: true
cmds:
- gh ils
2024-12-24 11:10:20 -05:00
issue:new:
desc: Create a new issue
2024-12-19 06:22:44 -05:00
silent: true
dir: .github/scripts
2024-12-19 06:22:44 -05:00
cmds:
- sh new_issue.sh
2024-12-22 18:43:30 -05:00
gen:proto:
2024-12-22 17:01:11 -05:00
desc: Generate proto files
2024-12-19 06:22:44 -05:00
silent: true
2024-12-22 17:01:11 -05:00
cmd: gum spin --spinner dot --title "Generating Protobufs..." -- make proto-gen
2024-12-19 06:22:44 -05:00
gen:sqlc:
2024-12-22 17:01:11 -05:00
desc: Generate SQLC files
2024-12-19 00:48:42 +00:00
silent: true
cmds:
2024-12-22 17:01:11 -05:00
- gum spin --spinner dot --title "Generating SQLC..." -- sqlc generate -f internal/database/sqlc.yaml
2024-12-19 06:22:44 -05:00
gen:templ:
2024-12-22 17:01:11 -05:00
desc: Generate templ files
2024-12-19 06:22:44 -05:00
silent: true
2024-12-22 17:01:11 -05:00
cmd: gum spin --spinner dot --title "Generating Templ..." -- templ generate
2024-12-22 18:43:30 -05:00
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