-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
62 lines (50 loc) · 1.3 KB
/
Copy pathTaskfile.yml
File metadata and controls
62 lines (50 loc) · 1.3 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
# https://taskfile.dev
version: '3'
tasks:
gomod:
desc: update go mod
cmds:
- go mod tidy
gofmt:
cmds:
- command -v goimports || go install golang.org/x/tools/cmd/goimports@latest
- gofmt -s -w .
- goimports -w .
golint:
cmds:
- command -v golangci-lint || go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.1
- golangci-lint run -v ./...
govulncheck:
desc: vulnerability detection
cmds:
- command -v govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
gci:
cmds:
- command -v gci || go install github.com/daixiang0/gci@latest
- gci write --skip-generated --custom-order -s standard -s "prefix(github.com/ysicing/spot)" -s default -s blank -s dot .
lint:
cmds:
- task: gofmt
- task: golint
- task: govulncheck
- task: gci
fmt:
cmds:
- task: gomod
- task: gofmt
- task: golint
- task: gci
snapshot:
desc: Build Snapshot
cmds:
- task: clean
- command -v goreleaser || go install github.com/goreleaser/goreleaser/v2@latest
- goreleaser release --snapshot --clean
clean:
desc: Clean Up Build Cache Files
cmds:
- rm -rf dist
default:
cmds:
- task: snapshot