-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathTaskfile.yaml
69 lines (60 loc) · 1.92 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3"
vars:
BUILD_DIR: build
tasks:
build:
cmds:
- cmd: mkdir -p {{.BUILD_DIR}}
silent: true
- go build -o {{.BUILD_DIR}}/mga
sources:
- internal/cmd/**/*.go
- internal/generate/event/dispatcher/*.go
- internal/generate/event/dispatcher/dispatchergen/*.go
- internal/generate/event/handler/*.go
- internal/generate/event/handler/handlergen/*.go
- internal/generate/kit/endpoint/*.go
- internal/generate/kit/endpoint/endpointgen/*.go
- internal/generate/testify/mock/*.go
- internal/generate/testify/mock/mockgen/*.go
- internal/scaffold/service/*.go
- pkg/**/*.go
- "*.go"
- go.*
generates:
- "{{.BUILD_DIR}}/mga"
generate:
deps: [build]
run: once
cmds:
# Paths changed to internal due to the introduction of devenv
- PATH="{{.ROOT_DIR}}/{{.BUILD_DIR}}:$PATH" go generate -x ./internal/...
- "{{.BUILD_DIR}}/mga generate kit endpoint ./internal/..."
- "{{.BUILD_DIR}}/mga generate event handler ./internal/..."
- "{{.BUILD_DIR}}/mga generate event handler --output subpkg:suffix=gen ./internal/..."
- "{{.BUILD_DIR}}/mga generate event dispatcher ./internal/..."
- "{{.BUILD_DIR}}/mga generate event dispatcher --output subpkg:suffix=gen ./internal/..."
- "{{.BUILD_DIR}}/mga generate testify mock ./internal/..."
- "{{.BUILD_DIR}}/mga generate testify mock --output subpkg:suffix=mocks ./internal/..."
- "{{.BUILD_DIR}}/mga create service --force internal/scaffold/service/test"
test:
deps: [generate]
cmds:
- go test -v -race ./...
lint:
deps: [generate]
cmds:
- golangci-lint run $LINT_ARGS
check:
cmds:
- task: test
- task: lint
fmt:
cmds:
- golangci-lint run --fix
snapshot:
cmds:
- goreleaser release --clean --snapshot
release:
cmds:
- goreleaser release --clean