Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from pathlib import Path
|
||||
import hashlib,json,sys,shutil
|
||||
R=Path('/home/jakub/devel/escapistsrereintroduced');B=Path('/tmp/erri-gameplay-root-1509')
|
||||
P=Path(sys.argv[1]);manifest=json.loads((P/'source-manifest.json').read_text())
|
||||
sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
|
||||
rows=manifest['files'];output=B/'integration.json';result=json.loads(output.read_text()) if output.exists() else {}
|
||||
for n,row in rows.items():
|
||||
assert n.startswith('addons/core/Scripts/Game/ERR/') or n.startswith('tests/') or n in {'tools/check.py','tools/source_bundle.py','tools/external_addons.py','tools/resource_references.py','docs/vanilla-resources.json'}
|
||||
assert n not in result
|
||||
assert (sha(R/n) if (R/n).exists() else None)==row['baseline_sha256'] and sha(P/n)==row['proposal_sha256']
|
||||
for n,row in rows.items():
|
||||
shutil.copyfile(P/n,R/n);assert sha(R/n)==row['proposal_sha256']
|
||||
result[n]={'before':row['baseline_sha256'],'after':sha(R/n),'proposal':str(P/n)}
|
||||
output.write_text(json.dumps(result,indent=2)+'\n');print('Integrated',len(rows),'files from',P)
|
||||
Reference in New Issue
Block a user