-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
47 lines (40 loc) · 1011 Bytes
/
Taskfile.yml
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
version: "3"
includes:
docs:
taskfile: ./docs/site
dir: ./docs/site
vars:
ENTRYPOINT: "{{.TASKFILE_DIR}}/cmd/jalapeno" # Path to main package
tasks:
lint:
desc: Runs linters
sources:
- "./**/*.go"
cmds:
- golangci-lint run
run:
desc: "Run a CLI command with arguments. Example: `task run -- execute ./my-recipe`"
cmds:
- go run {{.ENTRYPOINT}} {{.CLI_ARGS}}
build:
desc: Build the CLI
sources:
- "./**/*.go"
generates:
- "bin/jalapeno{{exeExt}}"
cmds:
- go build -o bin/jalapeno{{exeExt}} {{.ENTRYPOINT}}
debug:
desc: Starts the CLI in debug mode. After running the task, you can use for example VSCode to connect to the session
cmds:
- >-
$(go env GOPATH)/bin/dlv debug {{.ENTRYPOINT}}
--headless
--listen 127.0.0.1:52800
--api-version 2
-- {{.CLI_ARGS}}
test:
desc: Run the test suite
cmds:
- task: lint
- go test {{.CLI_ARGS}} ./...