-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
54 lines (45 loc) · 910 Bytes
/
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
version: "3"
vars:
PROGRAM: cisco-snmp-pwner
tasks:
deps:
cmds:
- go mod tidy -v
update:
cmds:
- go get -u
- go mod tidy -v
setup:
cmds:
- go install mvdan.cc/gofumpt@latest
build:
aliases: [default]
deps: [deps]
env:
CGO_ENABLED: 0
cmds:
- go fmt ./...
- gofumpt -l -w .
- go vet ./...
- go build -o {{.PROGRAM}}
test:
deps: [deps]
env:
CGO_ENABLED: 1 # required by -race
cmds:
- go test -race -cover ./...
run:
deps: [build]
cmds:
- ./{{.PROGRAM}}
lint:
cmds:
- golangci-lint run ./... --timeout=30m
- go mod tidy
lint-update:
cmds:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b {{ .GOPATH }}/bin
- golangci-lint --version
vars:
GOPATH:
sh: go env GOPATH