Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
81 lines (68 loc) · 2.06 KB
/
Copy pathTaskfile.yml
File metadata and controls
81 lines (68 loc) · 2.06 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3'
vars:
SCHEMA_REPO: '{{.SCHEMA_REPO | default "inference-gateway/schemas"}}'
SCHEMA_REF: '{{.SCHEMA_REF | default "main"}}'
GENERATED_FILES: supported-providers.md configuration.md rust-adk.md typescript-adk.md sdks.md
tasks:
default:
desc: List available tasks
cmds:
- task --list
silent: true
# The tasks below simply delegate to the matching bun script in package.json,
# so `task <name>` and `bun run <name>` are interchangeable.
dev:
desc: Start the VitePress dev server on http://localhost:5173
cmds:
- bun run dev
build:
desc: Build the static site into .vitepress/dist/
cmds:
- bun run build
preview:
desc: Serve the built site from .vitepress/dist/ locally
cmds:
- bun run preview
format:
desc: Format the repository with Prettier
cmds:
- bun run format
format:check:
desc: Check formatting with Prettier without writing changes
cmds:
- bun run format:check
lint:md:
desc: Lint Markdown with markdownlint
cmds:
- bun run lint:md
lint:md:fix:
desc: Autofix Markdown lint issues with markdownlint
cmds:
- bun run lint:md:fix
generate:
desc: Regenerate provider-derived docs from the canonical openapi.yaml
env:
SCHEMA_REPO: '{{.SCHEMA_REPO}}'
SCHEMA_REF: '{{.SCHEMA_REF}}'
cmds:
- bun scripts/generate-provider-docs.mjs
- bunx prettier --write {{.GENERATED_FILES}}
generate:check:
desc: Fail if the committed docs have drifted from the canonical openapi.yaml
env:
SCHEMA_REPO: '{{.SCHEMA_REPO}}'
SCHEMA_REF: '{{.SCHEMA_REF}}'
cmds:
- task: generate
- cmd: |
git diff --exit-code -- {{.GENERATED_FILES}} || {
echo ''
echo 'ERROR: provider docs are out of date with the canonical openapi.yaml.'
echo 'Run `task generate` and commit the result.'
exit 1
}
silent: true
test:
desc: Run the provider-docs generator regression tests against the fixture
cmds:
- bun run test