-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
60 lines (49 loc) · 1019 Bytes
/
Taskfile.yml
File metadata and controls
60 lines (49 loc) · 1019 Bytes
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
# https://taskfile.dev
version: '3'
tasks:
default:
desc: "Run default tasks (lint, build and test)"
cmds:
- task: lint
- task: build
- task: test
build:
desc: "Run Go and Nix build"
cmds:
- task: build:go
- task: build:nix
- defer: { task: clean}
build:go:
desc: "Run Go build"
cmds:
- cmd: go build -o nar .
build:nix:
desc: "Run Nix build"
cmds:
- nix build --no-link .
test:
desc: "Run Go tests"
cmds:
- go test ./...
fmt:
desc: "Format Go code"
cmds:
- go fmt ./...
lint:
desc: "Lint Go code"
cmds:
- golangci-lint run ./...
- go vet ./...
clean:
desc: "Clean build artifacts"
cmds:
- rm -f nar
- go clean
run:
desc: "Run nar (usage: task run -- <directory>)"
cmds:
- go run . {{.CLI_ARGS}}
run:sri:
desc: "Run nar with --sri flag (usage: task run:sri -- <directory>)"
cmds:
- go run . --sri {{.CLI_ARGS}}