2024-11-01 14:25:30 +00:00
|
|
|
version: '3'
|
2024-11-01 17:49:56 +00:00
|
|
|
|
2024-11-01 14:25:30 +00:00
|
|
|
env:
|
|
|
|
ENV: development
|
2024-11-01 17:49:56 +00:00
|
|
|
|
2024-11-10 09:22:33 +00:00
|
|
|
dotenv: ['.env.{{.ENV}}']
|
|
|
|
|
2024-11-01 14:25:30 +00:00
|
|
|
tasks:
|
2024-11-15 16:12:15 +00:00
|
|
|
install:
|
|
|
|
desc: install packages
|
|
|
|
cmds:
|
|
|
|
- deno install --allow-scripts=npm:@sveltejs/kit
|
|
|
|
|
|
|
|
start-graph:
|
|
|
|
desc: run graph server
|
|
|
|
cmds:
|
|
|
|
- cmd: go run ./graph/server
|
|
|
|
|
|
|
|
start-web:
|
|
|
|
desc: run web in dev mode
|
|
|
|
cmd: deno task dev
|
|
|
|
|
2024-11-01 14:25:30 +00:00
|
|
|
gen:
|
|
|
|
desc: use go generate, for graph files
|
|
|
|
preconditions:
|
|
|
|
- go mod tidy
|
|
|
|
cmds:
|
2024-11-15 16:12:15 +00:00
|
|
|
- task: graph-gen
|
2024-11-10 09:22:33 +00:00
|
|
|
- task: ent-gen
|
2024-11-01 14:25:30 +00:00
|
|
|
|
2024-11-15 16:12:15 +00:00
|
|
|
vuln-check:
|
2024-11-01 14:25:30 +00:00
|
|
|
desc: perform go vuln check
|
|
|
|
cmds:
|
|
|
|
- govulncheck -show verbose ./...
|
|
|
|
|
2024-11-15 16:12:15 +00:00
|
|
|
graph-gen:
|
|
|
|
desc: graph gen
|
2024-11-01 14:25:30 +00:00
|
|
|
cmds:
|
2024-11-15 16:12:15 +00:00
|
|
|
- go mod tidy
|
|
|
|
- go generate ./graph
|
2024-11-01 17:49:56 +00:00
|
|
|
|
2024-11-15 16:12:15 +00:00
|
|
|
graph-codegen:
|
2024-11-01 17:49:56 +00:00
|
|
|
desc: generate graph types
|
|
|
|
cmds:
|
|
|
|
- cmd: deno task codegen
|
2024-11-01 14:25:30 +00:00
|
|
|
|
2024-11-10 09:22:33 +00:00
|
|
|
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 14:25:30 +00:00
|
|
|
cmds:
|
2024-11-10 09:22:33 +00:00
|
|
|
- task: ent-gen
|
|
|
|
- go run ./cmd/migrate-up
|