-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
111 lines (109 loc) · 2.34 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
version: '3'
vars:
ROOT_DIR:
sh: git rev-parse --show-toplevel
PORT: 8000
tasks:
clean:
desc: Clean
cmds:
- rm -f cook-docs
- rm -f dist
coverage:
desc: Go test coverage
cmds:
- go test -coverprofile=coverage.out ./...
dist:
desc: Create go releases
cmds:
- goreleaser release --rm-dist --snapshot --skip-sign
deps:
desc: Download dependencies
cmds:
- go get -d ./...
dry-run:
desc: Perform a dry run
cmds:
- go run -v ./... --recipe-search-root cmd/cook-docs/testdata --dry-run
debug:
desc: Run go program
cmds:
- >
go run -v ./... --recipe-search-root cmd/cook-docs/testdata \
--template-files cmd/cook-docs/testdata/recipe.md.gotmpl \
--log-level debug --dry-run
fmt:
desc: Print the names of the files that are modified.
cmds:
- go fmt ./...
gocyclo:
desc: Run gocyclo
cmds:
- cmd: gocyclo -over 15 cmd/ pkg/
ignore_error: true
goreport:
desc: Run goreport commands
cmds:
- task: ineffassign
- task: misspell
- task: gocyclo
- task: vet
help:
desc: Show app help
cmds:
- go run ./... --help
ineffassign:
desc: ineffassign
cmds:
- cmd: ineffassign ./...
ignore_error: true
jsonify:
desc: Jsonify the recipe
cmds:
- go run ./... --jsonify
lint:
desc: Lint the project
cmds:
- yamllint .
misspell:
desc: Run misspell
cmds:
- cmd: misspell cmd/ pkg/
ignore_error: true
run:
desc: Run go program
cmds:
- go run -v ./... --recipe-search-root cmd/cook-docs/testdata
serve:
desc: Serve a mkdocs server
cmds:
- >-
docker run --rm -it -p {{ .PORT }}:{{ .PORT}} -v ${PWD}:/docs
--platform linux/amd64 squidfunk/mkdocs-material serve
--dev-addr 0.0.0.0:{{ .PORT }} -f ./mkdocs.yml
test:
desc: Run go tests
cmds:
- go test -v ./...
vet:
desc: Vet
cmds:
- cmd: go vet ./...
ignore_error: true
vendor:
desc: Generate vendor
cmds:
- go mod vendor
- go mod tidy
update:
desc: Update vendors
cmds:
- go get -u ./...
- go mod vendor
- go mod tidy
default:
desc: Lists tasks with or without a description
cmds:
- task -a
silent: true