-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
36 lines (35 loc) · 1.08 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
version: "3"
tasks:
generate:
cmds:
- /bin/bash -c "pushd .component_generator; ./generate_overwrite.sh; popd"
- go generate ./...
- git add wire_gen.go
check:
cmds:
- trunk check --sample 10
gosums:
cmds:
- find . -name 'go.mod' -exec /bin/bash -c 'pushd `dirname $1`; git add go.mod go.sum; popd' '_' {} \;
pre-commit:
cmds:
- task: generate
- task: gosums
- task: check
tidy:
desc: Run "go mod tidy -go=1.8" in all packages
cmds:
- find . -name 'go.mod' -exec /bin/bash -c 'pushd `dirname $1`; go mod tidy -go=1.18; popd' '_' {} \;
update:
desc: Run "go get -u ./..." in all packages
cmds:
- find . -name 'go.mod' -exec /bin/bash -c 'pushd `dirname $1`; go get -u ./...; popd' '_' {} \;
test:
desc: Run "go test ./..." in all packages
cmds:
- find . -name 'go.mod' -exec /bin/bash -c 'pushd `dirname $1`; go test ./...; popd' '_' {} \;
workuse:
desc: Add all plugins to go.work
cmds:
- go work init . || exit 0
- go work use $(find . -name 'go.mod' -printf "%h\n")