-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
50 lines (41 loc) · 932 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
version: "3"
vars:
PROGRAM: pandocserver
tasks:
update:
cmds:
- go get -u
- go mod tidy -v
build:
aliases: [default]
cmds:
- go fmt ./...
- go vet ./...
- go build -o {{.PROGRAM}}
test:
env:
CGO_ENABLED: 1 # required by -race
cmds:
- go test -race -cover ./...
run:
cmds:
- go run . -debug -config config.json
run-json:
cmds:
- go run . -debug -config config.json -json
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
docker-update:
cmds:
- docker pull golang:latest
- docker pull scratch:latest
- docker build --tag {{.PROGRAM}}:dev .