-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
48 lines (41 loc) · 1.03 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
# All requirements used in these tasks:
#
# Only works on unix based shells.
#
# - go (1.20+)
# - richgo
# - golangci-lint
# - stringer (https://pkg.go.dev/golang.org/x/tools/cmd/stringer)
version: "3"
tasks:
build:
deps: [generate]
cmds:
- go build -o phpls -ldflags="-s -w" cmd/phpls/main.go
sources:
- cmd/**/*
- internal/**/*
- pkg/**/*
- third_party/phpstorm-stubs/**/*
- go.mod
- go.sum
generates:
- phpls
test:
deps: [generate]
cmds:
- richgo test ./... -shuffle=on -race -cover -timeout=60s -tags what
lint:
deps: [generate]
cmds:
- golangci-lint run --timeout=60s
check:
deps: [test, lint]
generate:
run: once
cmds:
- go generate ./...
# Tail the latest log file from wherever you are.
logs:
cmds:
- tail -f $(ls -cl $(phpls logs)/* | tail -n 1 | rev | cut -d' ' -f1 | rev)