-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
64 lines (53 loc) · 1.46 KB
/
Taskfile.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# https://taskfile.dev
version: "3"
dotenv:
- ".env"
tasks:
default:
desc: "Gettings started"
cmds:
- task: install
install:
desc: "Install dependencies"
cmds:
- go install github.com/go-task/task/v3/cmd/task@latest
- go install github.com/air-verse/air@latest
- go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
- go install github.com/swaggo/swag/cmd/swag@latest
- go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
service:up:
desc: "Start services"
cmd: docker compose up -d
service:down:
desc: "Stop services"
cmd: docker compose down
dev:
desc: "Start development server"
cmd: air
lint:
desc: "Run linter"
cmd: golangci-lint run ./...
build:
desc: "Build binary"
cmd: go build -o ./bin/{{.APP_NAME}} ./cmd/app/main.go
requires:
vars:
- APP_NAME
start:
desc: "Start binary"
cmd: ./bin/{{.APP_NAME}}
requires:
vars:
- APP_NAME
proto:gen:
desc: "Generate proto file"
cmds:
- |
cd protos && \
protoc \
--go_out=paths=source_relative:./gen/go \
--go-grpc_out=paths=source_relative:./gen/go \
--grpc-gateway_out=paths=source_relative:./gen/go \
--openapiv2_out=logtostderr=true,json_names_for_fields=false,simple_operation_ids=true:./gen/openapi \
-I proto \
./proto/mail/v1/mail.proto