Files
leleka/scripts/e2e/codex/tasks/freeze.py
T

14 lines
562 B
Python

#!/usr/bin/env python3
"""Rewrite tasks/MANIFEST.sha256 (see delta/taskfile.py). Run after selftest.py, commit, then install read-only on the server."""
import os
import sys
HERE = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(HERE, "..", "delta"))
import taskfile # noqa: E402
lines = taskfile.manifest_lines(HERE)
with open(os.path.join(HERE, "MANIFEST.sha256"), "w", encoding="utf-8", newline="\n") as f:
f.write("\n".join(lines) + "\n")
print("%d manifest lines for %d tasks" % (len(lines), len(taskfile.task_ids(HERE))))