rano/taskfile.yml

61 lines
1.1 KiB
YAML
Raw Normal View History

2024-11-01 19:55:30 +05:30
version: '3'
2024-11-01 23:19:56 +05:30
2024-11-01 19:55:30 +05:30
env:
ENV: development
2024-11-01 23:19:56 +05:30
2024-11-10 14:52:33 +05:30
dotenv: ['.env.{{.ENV}}']
2024-11-01 19:55:30 +05:30
tasks:
gen:
desc: use go generate, for graph files
preconditions:
- go mod tidy
cmds:
2024-11-10 14:52:33 +05:30
- go mod tidy
2024-11-01 19:55:30 +05:30
- go generate ./graph
2024-11-10 14:52:33 +05:30
- task: ent-gen
2024-11-01 19:55:30 +05:30
check:
desc: perform go vuln check
cmds:
- govulncheck -show verbose ./...
install:
desc: install packages
cmds:
- deno install --allow-scripts=npm:@sveltejs/kit
graph:
desc: run graph server
cmds:
- cmd: go run ./graph/server
2024-11-01 23:19:56 +05:30
codegen:
desc: generate graph types
cmds:
- cmd: deno task codegen
2024-11-01 19:55:30 +05:30
web:
desc: run web in dev mode
2024-11-10 14:52:33 +05:30
cmd: deno task dev
ent-new:
desc: create new db Emtity
cmd: cd ./db && go run -mod=mod entgo.io/ent/cmd/ent new {{.name}}
ent-gen:
desc: genertate from ent schema
cmds:
- go generate ./db/ent
migrate-new:
desc: create a new sql migration file
cmds:
- migrate create -ext sql -dir ./db/migrations -seq {{.name}}
migrate-up:
desc: apply automatically migration using Ent schema
2024-11-01 19:55:30 +05:30
cmds:
2024-11-10 14:52:33 +05:30
- task: ent-gen
- go run ./cmd/migrate-up