-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
42 lines (32 loc) · 1.37 KB
/
Taskfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# https://taskfile.dev
version: '3'
tasks:
gen:
cmds:
- protoc -I tools/proto -I . -I ${GOPATH}/src -I ${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate --go_out=tools/proto --go_opt=paths=source_relative --go-grpc_out=tools/proto --go-grpc_opt=paths=source_relative --validate_out="lang=go:tools/proto" --grpc-gateway_out tools/proto --grpc-gateway_opt logtostderr=true --grpc-gateway_opt paths=source_relative --grpc-gateway_opt generate_unbound_methods=true --openapiv2_out docs --openapiv2_opt logtostderr=true --openapiv2_opt generate_unbound_methods=true tools/proto/*.proto
- docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate -i /local/docs/link.swagger.json -l html2 -o /local/docs
http:
cmds:
- go run main.go http
main:
cmds:
- go run main.go main
gen-schema:
cmds:
# wipe existing generated code
- find tools/ent/codegen -type f \( ! -iname "codegen.go" \) -delete
# generate code
- go run entgo.io/ent/cmd/ent generate ./tools/ent/schema --target ./tools/ent/codegen
execute-migration:
cmds:
- go run main.go execute-migration
generate-migration:
cmds:
- go run main.go generate-migration
- go generate ./tools/ent
validate-migration:
cmds:
- atlas migrate validate migrations
rehash-migration:
cmds:
- atlas migrate hash --force