-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
80 lines (65 loc) · 1.89 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3'
silent: true
vars:
PROJECT_NAME: "ollamaUnloader"
tasks:
dev:run:
dotenv:
- "default.env"
cmds:
- go run cmd/{{.PROJECT_NAME}}/main.go
dev:build:
cmds:
- go build -trimpath -ldflags "-s -w" -o bin/{{.PROJECT_NAME}}{{if eq OS "windows"}}.exe{{end}} cmd/{{.PROJECT_NAME}}/main.go
dev:build:linux:
env:
GOOS: "linux"
GOARCH: "amd64"
cmds:
- go build -trimpath -ldflags "-s -w" -o bin/{{.PROJECT_NAME}} cmd/{{.PROJECT_NAME}}/main.go
dev:build:macos:
env:
GOOS: "darwin"
GOARCH: "amd64"
cmds:
- go build -trimpath -ldflags "-s -w" -o bin/{{.PROJECT_NAME}} cmd/{{.PROJECT_NAME}}/main.go
dev:build:windows:
env:
GOOS: "windows"
GOARCH: "amd64"
cmds:
- go build -trimpath -ldflags "-s -w" -o bin/{{.PROJECT_NAME}}.exe cmd/{{.PROJECT_NAME}}/main.go
dev:test:
cmds:
- go test -v -race -buildvcs ./...
dev:test:cover:
cmds:
- go test -v -race -buildvcs -coverprofile=./coverage.out ./...
- go tool cover -html=./coverage.out -o=./coverage.html
qa:analyze-binary-web:
cmds:
- gsa --web ./bin/{{.PROJECT_NAME}}
qa:analyze-binary-tui:
cmds:
- gsa --tui ./bin/{{.PROJECT_NAME}}
qa:tidy:
cmds:
- go fmt ./...
- go mod tidy -v
qa:lint:fix:
cmds:
- golangci-lint run --fix
qa:audit:
cmds:
- go mod verify
- go vet ./...
- staticcheck -checks=all,-ST1000,-U1000 ./...
- govulncheck ./...
- go test -race -buildvcs -vet=off ./...
tools:install:
cmds:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- go install honnef.co/go/tools/cmd/staticcheck@latest
- go install golang.org/x/vuln/cmd/govulncheck@latest
- go install github.com/Zxilly/go-size-analyzer/cmd/gsa@latest
- go install github.com/4meepo/tagalign/cmd/tagalign@latest