-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathTaskfile.yml
More file actions
55 lines (45 loc) · 1 KB
/
Taskfile.yml
File metadata and controls
55 lines (45 loc) · 1 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
version: '3'
dotenv:
- .env
- .env.local
- .versions
vars:
TARGET_DIR: target
TOOLS_BIN_DIR: '{{.USER_WORKING_DIR}}/bin'
VERSION:
sh: git describe --tags 2>/dev/null | sed 's/^v//' || echo "0.0.0"
includes:
build: ./taskfiles/build.yml
tools: ./taskfiles/tools.yml
test: ./taskfiles/test.yml
tasks:
install:
desc: Install Benthos
cmds:
- go install ./cmd/benthos
deps:
desc: Tidy Go modules
cmds:
- go mod tidy
fmt:
desc: Format code and tidy modules
deps:
- tools:install-golangci-lint
cmds:
- '{{.TOOLS_BIN_DIR}}/golangci-lint fmt cmd/... internal/... public/...'
- go mod tidy
lint:
desc: Run linter on code
deps:
- tools:install-golangci-lint
cmds:
- '{{.TOOLS_BIN_DIR}}/golangci-lint run cmd/... internal/... public/...'
test:
desc: Run unit, template and config tests
deps:
- test:unit
- test:template
generate:
desc: Runs Go generate
cmds:
- go generate ./...