Files
Investidor-V2/outputs/investmoz-negocios-classificacao-ativacao-20261016/prepare-verification.py
T
nala 6a76aac80f
tests / ci (push) Canceled after 0s
versao compilada 1
2026-10-16 09:17:28 +02:00

9 lines
1015 B
Python

from pathlib import Path
root=Path(__file__).resolve().parents[2];out=Path(__file__).resolve().parent
p=(root/'outputs/investmoz-promotor-contexto-ativacao-20261015/verify-preservation.php').read_text('utf-8')
p=p.replace('promoter_before_','negocios_before_').replace('investmoz-promotor-contexto-QA-20261015','investmoz-negocios-classificacao-QA-20261016').replace('MANIFESTO-DELTA.json','MANIFESTO.json').replace("$s['candidate_sha256']","$s['after_sha256']").replace("'candidate_sources_verified'=>3","'candidate_sources_verified'=>11")
p=p.replace("if(in_array($n,$allowed,true))continue;","if(in_array($n,$allowed,true)||str_starts_with($n,'public/build/'))continue;")
needle=" $private=json_decode(file_get_contents($b['private_directory'].'/backup-proof-private.json'),true);"
p=p.replace(needle," foreach($m['build']as$s)if(hash_file('sha256',$root.'/'.$s['path'])!==$s['sha256'])throw new RuntimeException('Candidate build hash mismatch');\n"+needle)
(out/'verify-preservation.php').write_text(p,'utf-8')