-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
73 lines (61 loc) · 1.47 KB
/
Taskfile.yml
File metadata and controls
73 lines (61 loc) · 1.47 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
65
66
67
68
69
70
71
72
73
version: '3'
tasks:
default:
desc: "Build a windows amd64 binary"
cmds:
- task: build_single_target
vars:
GOOS: "windows"
GOARCH: "amd64"
build_single_target:
desc: "Build a binary based on GOOS and GOARCH env vars"
env:
GOOS: "{{ .GOOS }}"
GOARCH: "{{ .GOARCH }}"
cmds:
- goreleaser build --snapshot --single-target --clean
release_local:
desc: "Build a complete release, but do not publish"
cmds:
- goreleaser check
- goreleaser release --snapshot --clean
release:
desc: "Build and publish a release"
cmds:
- goreleaser check
- goreleaser release --clean
changelog:
desc: "Summarize commits since the last tag"
cmds:
- git log $(git describe --tags --abbrev=0)..HEAD --oneline
generate:
desc: "Generate code"
cmds:
- go generate ./...
tidy:
desc: "Update go.mod"
cmds:
- go mod tidy
lint:
desc: "Run linters"
cmds:
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0
- golangci-lint config verify
- golangci-lint run
test:
desc: "Run tests"
cmds:
- go test ./...
check:
desc: "Run all checks"
deps: [lint, test]
cmds:
- goreleaser check
godoc:
desc: "View go docs locally"
cmds:
- go run golang.org/x/pkgsite/cmd/pkgsite@latest -open
clean:
desc: "Clean up local build artifacts"
cmds:
- rm -rf dist