forked from zhaohui-yang/official-document-drafting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_all.py
More file actions
29 lines (19 loc) · 778 Bytes
/
Copy pathbuild_all.py
File metadata and controls
29 lines (19 loc) · 778 Bytes
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
#!/usr/bin/env python3
"""Build all generated artifacts from prompts/ source."""
from __future__ import annotations
import pathlib
import subprocess
import sys
REPO_ROOT = pathlib.Path(__file__).resolve().parent.parent
def run(args: list[str]) -> None:
completed = subprocess.run(args, cwd=REPO_ROOT)
if completed.returncode != 0:
raise SystemExit(completed.returncode)
def main() -> int:
python = sys.executable
run([python, str(REPO_ROOT / "adapters" / "skill" / "build.py")])
run([python, str(REPO_ROOT / "adapters" / "offline" / "build.py"), "--profile", "default"])
run([python, str(REPO_ROOT / "adapters" / "offline" / "build.py"), "--profile", "small-local"])
return 0
if __name__ == "__main__":
raise SystemExit(main())