-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
64 lines (54 loc) · 1.45 KB
/
Taskfile.yml
File metadata and controls
64 lines (54 loc) · 1.45 KB
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
version: '3'
# Task targets for the CryptOS-PKI api/ module.
# Requires on PATH: buf, protoc-gen-go, protoc-gen-go-grpc, golic.
tasks:
default:
desc: Show available tasks
cmds:
- task --list
fmt:
desc: Format proto files
cmds:
- buf format -w
lint:
desc: Lint proto files
cmds:
- buf lint
- buf format -d
generate:
desc: Generate Go stubs from protos
cmds:
- buf generate
generate:verify:
desc: Generate and assert the working tree is clean
cmds:
- task: generate
- |
if ! git diff --quiet go/; then
echo "Generated stubs are out of date. Run 'task generate' and commit the result." >&2
git --no-pager diff go/ >&2
exit 1
fi
license:
desc: Inject Apache 2.0 license headers via golic
cmds:
- golic inject -t apache2 -c "2026 Shane"
test:
desc: Run Go tests
cmds:
- go test ./go/...
tidy:
desc: Tidy the Go module
cmds:
- go mod tidy
ci:
desc: Full local validation chain (fmt + lint + generate-and-verify + test)
cmds:
- task: fmt
- task: lint
- task: generate:verify
- task: test
# Note: a strict license:check gate isn't part of `task ci` because
# `buf format` reindents block comments in a way `golic --dry`
# doesn't recognize as equivalent. Headers are visually confirmed and
# `task license` is the canonical re-injection step.