This commit is contained in:
@@ -28,11 +28,11 @@ ci_run() {
|
||||
build_manifest() {
|
||||
local manifest=$1 out=$2 root
|
||||
root="$(repo_root)"
|
||||
mkdir -p "$root/dist/prompts"
|
||||
# Write on host to avoid ownership issues; container prints to stdout.
|
||||
TMP_OUT=$(mktemp)
|
||||
trap '[[ -n "${TMP_OUT:-}" ]] && rm -f "$TMP_OUT"' EXIT
|
||||
ci_run "python3 scripts/prompt_build.py '$manifest' -" >"$TMP_OUT"
|
||||
mkdir -p "$(dirname "$out")"
|
||||
mv "$TMP_OUT" "$out"
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ case "$cmd" in
|
||||
pack)
|
||||
shift; area=${1:-}; root="$(repo_root)"
|
||||
case "$area" in
|
||||
cto) build_manifest "$root/COMMON/prompt/manifests/cto.yaml" "$root/dist/prompts/cto.md" ;;
|
||||
coo) build_manifest "$root/COMMON/prompt/manifests/coo.yaml" "$root/dist/prompts/coo.md" ;;
|
||||
cto) build_manifest "$root/COMMON/prompt/manifests/cto.yaml" "$root/CTO/dist/prompts/cto.md" ;;
|
||||
coo) build_manifest "$root/COMMON/prompt/manifests/coo.yaml" "$root/COO/dist/prompts/coo.md" ;;
|
||||
*) echo "Unknown area: $area" >&2; exit 2 ;;
|
||||
esac ;;
|
||||
all)
|
||||
root="$(repo_root)"; mkdir -p "$root/dist/prompts"
|
||||
root="$(repo_root)"
|
||||
"$0" pack cto
|
||||
"$0" pack coo ;;
|
||||
lint)
|
||||
|
Reference in New Issue
Block a user