-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
57 lines (49 loc) · 1.41 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
version: "3"
tasks:
local-lint:
desc: Run "golangci-lint" in all packages with the go.work
cmds:
- |
for i in $(find . -name 'go.mod'); do
if [[ "$i" == "./.github/go.mod" ]]; then
continue
fi
pushd ${i:0:-6} 1>/dev/null
echo $i
golangci-lint run || true
popd 1>/dev/null
done
lint:
desc: Run "golangci-lint" in all packages
cmds:
- cmd: dagger call lint --root=.
mod-tidy:
desc: Run "go mod tidy" in all packages
cmds:
- cmd: dagger call tidy --root=. source export --path=.
mod-update:
desc: Run "go get -u -t ./..." in all packages
cmds:
- cmd: dagger call update --root=. source export --path=.
test:
desc: Run "go test ./..." in all packages and then "./scripts/test.sh" to test all binaries.
cmds:
- cmd: dagger call test --root=.
- cmd: ./scripts/test.sh
generate:
desc: "Run go generate ./... in all packages."
cmds:
- |
for i in $(find . -name 'go.mod'); do
if [[ "$i" == "./.github/go.mod" ]]; then
continue
fi
pushd ${i:0:-6} 1>/dev/null
echo $i
go generate ./... || true
popd 1>/dev/null
done
deps:
desc: Update dependencies on all changed packages to the latest git commit
cmds:
- cmd: GOSUMDB=off GOPROXY="direct" ./scripts/deps.sh main all