-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTaskfile.yml
24 lines (21 loc) · 1008 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
version: "3"
vars:
PROJECT_NAME: TODO
tasks:
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml
docs:generate:
desc: Create all generated documentation content
deps:
- task: go:cli-docs
cmds:
# Make the formatting consistent with the non-generated Markdown
- task: general:format-prettier
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml
go:cli-docs:
desc: Generate command line interface reference documentation
dir: ./docsgen
cmds:
# Command examples use os.Args[0] so the docs generation binary must have the same filename as the project
- go build -o {{.PROJECT_NAME}}{{exeExt}}
# The binary is invoked like this instead of `./{{.PROJECT_NAME}}` to remove the `./` chars from the examples
- PATH=. {{.PROJECT_NAME}} ../docs/commands