-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
67 lines (56 loc) · 1.22 KB
/
Taskfile.yml
File metadata and controls
67 lines (56 loc) · 1.22 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
version: "3"
vars:
BINARY: folio
CMD: ./cmd/folio
BIN_DIR: bin
tasks:
build:
desc: Build the folio binary
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -o {{.BIN_DIR}}/{{.BINARY}} {{.CMD}}
sources:
- "**/*.go"
- go.mod
- go.sum
generates:
- "{{.BIN_DIR}}/{{.BINARY}}"
run:
desc: "Build and run the server (usage: task run -- folio.toml)"
deps: [build]
cmds:
- "{{.BIN_DIR}}/{{.BINARY}} {{.CLI_ARGS}}"
test:
desc: Run all tests
cmds:
- go test ./... -timeout 60s
test:watch:
desc: Run tests in watch mode (requires entr — brew/apt install entr)
cmds:
- find . -name "*.go" | entr -c go test ./... -timeout 60s
fmt:
desc: Format all Go source files
cmds:
- gofmt -w .
vet:
desc: Run go vet
cmds:
- go vet ./...
check:
desc: Run fmt, vet, and tests
cmds:
- task: fmt
- task: vet
- task: test
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BIN_DIR}}
tidy:
desc: Tidy go.mod and go.sum
cmds:
- go mod tidy
gencss:
desc: Regenerate internal/assets/static/highlight.css from chroma themes
cmds:
- go run ./cmd/gencss