Files
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

20 lines
903 B
Python

#!/usr/bin/env python3
"""Keep complete native diagnostics and exact fixture/source provenance."""
from pathlib import Path
import json,shutil,sys
name=sys.argv[1]
if not name.isalnum(): raise ValueError('Use an alphanumeric run suffix')
source=Path('/tmp/erri-rescue-factions-source-'+name)
profile=Path('/tmp/erri-rescue-factions-run-'+name)
target=Path(__file__).with_name('run-'+name)
target.mkdir()
for filename in ['runner-output.log','fixture-inputs.json']:
if (profile/filename).exists(): shutil.copy2(profile/filename,target/filename)
fixture=source/'addons/core/Scripts/Game/ERR/00_Core/ERR_ZRescueFactionFixture.c'
if fixture.exists(): shutil.copy2(fixture,target/'native-fixture.c')
sessions=sorted((profile/'logs').glob('logs_*'))
if sessions:
for path in sessions[-1].iterdir():
if path.is_file() and path.suffix in {'.log','.json'}: shutil.copy2(path,target/path.name)
print(target)