-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
97 lines (80 loc) · 1.78 KB
/
Taskfile.yml
File metadata and controls
97 lines (80 loc) · 1.78 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
85
86
87
88
89
90
91
92
93
94
95
96
97
version: '3'
vars:
BINARY: mulonda
BIN_DIR: ./bin
CONFIG_FILE: mulonda.yaml
WATCHLIST_FILE: data/watchlist.yaml
CLI_ARGS: ""
silent: false
tasks:
default:
desc: Show available tasks
cmds:
- task --list
build:
desc: Build mulonda binary into ./bin
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -o {{.BIN_DIR}}/{{.BINARY}} .
run:
desc: Run mulonda with optional CLI_ARGS, e.g. task run CLI_ARGS="list"
cmds:
- go run . {{.CLI_ARGS}}
test:
desc: Run all Go tests
cmds:
- go test ./...
tidy:
desc: Tidy go modules
cmds:
- go mod tidy
fmt:
desc: Format Go source files
cmds:
- gofmt -w .
vet:
desc: Run go vet checks
cmds:
- go vet ./...
check:
desc: Run standard quality checks
cmds:
- task: fmt
- task: tidy
- task: vet
- task: test
clean:
desc: Remove local build outputs
cmds:
- rm -rf {{.BIN_DIR}}
init-config:
desc: Create local config file if missing
status:
- test -f {{.CONFIG_FILE}}
cmds:
- cp config.example.yml {{.CONFIG_FILE}}
list:
desc: Show effective watchlist
cmds:
- go run . --watchlist {{.WATCHLIST_FILE}} list
add:
desc: Add a rule via ARGS, e.g. task add ARGS="chmod 777"
vars:
ARGS: ""
preconditions:
- sh: test -n "{{.ARGS}}"
msg: "Usage: task add ARGS=\"<command pattern>\""
cmds:
- go run . --watchlist {{.WATCHLIST_FILE}} add {{.ARGS}}
config-show:
desc: Print effective config
cmds:
- go run . --config {{.CONFIG_FILE}} config show
install:
desc: Run install subcommand stub
cmds:
- go run . install
uninstall:
desc: Run uninstall subcommand stub
cmds:
- go run . uninstall