-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathTaskfile.yml
More file actions
84 lines (69 loc) · 1.47 KB
/
Taskfile.yml
File metadata and controls
84 lines (69 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
74
75
76
77
78
79
80
81
82
83
84
version: "3"
vars:
PROGRAM: websitewatcher
tasks:
deps:
cmds:
- go mod tidy -v
update:
deps: [deps, generate]
cmds:
- go get -u
- go get -u tool
- go mod tidy -v
generate:
deps: [sqlc, templ]
sqlc:
cmds:
- go tool sqlc generate
templ:
cmds:
- go tool templ generate
- go tool templ fmt .
build:
aliases: [default]
deps: [deps, generate]
env:
CGO_ENABLED: 0
cmds:
- go fmt ./...
- go tool gofumpt -l -w .
- go vet ./...
- go fix ./...
- go build -o {{.PROGRAM}}
test:
deps: [deps, generate]
env:
CGO_ENABLED: 1
cmds:
- go test -race -cover ./...
run:
deps: [build]
cmds:
- ./{{.PROGRAM}} -debug -dump-diff-html -dry-run -config config.json
run-once:
deps: [build]
cmds:
- ./{{.PROGRAM}} -debug -dump-diff-html -dry-run -config config.json -mode once
configcheck:
deps: [build]
cmds:
- ./{{.PROGRAM}} -config config.json -configcheck
version:
deps: [build]
cmds:
- ./{{.PROGRAM}} -version
lint:
cmds:
- golangci-lint run ./... --timeout=30m
- go mod tidy
lint-update:
cmds:
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
tag:
cmds:
- git tag -a "${TAG}" -m "${TAG}"
- git push origin "${TAG}"
preconditions:
- sh: '[[ -n "${TAG}" ]]'
msg: "Please set the TAG environment variable"