13 lines
681 B
Python
13 lines
681 B
Python
"""Build a deterministic, dependency-free download; no shared files modified."""
|
|
from pathlib import Path
|
|
from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED
|
|
root = Path(__file__).resolve().parent
|
|
files = ['README.md', 'cli.cjs', 'sample.jsonl', 'site/engine.js', 'tests/core.test.cjs', 'tests/cli.test.cjs']
|
|
with ZipFile(root / 'site/context-priority.zip', 'w') as archive:
|
|
for name in sorted(files):
|
|
entry = ZipInfo('context-priority/' + name, date_time=(2026, 10, 10, 0, 0, 0))
|
|
entry.compress_type = ZIP_DEFLATED
|
|
entry.external_attr = 0o100644 << 16
|
|
archive.writestr(entry, (root / name).read_bytes())
|
|
print('Built site/context-priority.zip')
|