-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathTaskfile.yaml
36 lines (31 loc) · 942 Bytes
/
Taskfile.yaml
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
version: '3'
tasks:
install:
desc: install dependencies
cmds:
- npm install jsonschema2mk --global
generate:
desc: generate the jsonschema and documentation
cmds:
- task: schema
- task: docs
schema:
desc: generate a new jsonschema and corresponding config/config.example.yaml
cmds:
- go run jsonschema/schema_generator.go
docs:
desc: generate documentation from the jsonschema
cmds:
- npx jsonschema2mk --schema jsonschema/core.config.json > jsonschema/api-docs.md
ci:
desc: a task that runs during CI to confirm there are no changes after running generate
cmds:
- task: generate
- "git config --global --add safe.directory /workdir"
- |
status=$(git status --porcelain)
if [ -n "$status" ]; then
echo "detected git diff after running generate; please re-run tasks"
echo "$status"
exit 1
fi