4 lines
2.3 KiB
PHP
4 lines
2.3 KiB
PHP
<?php
|
|
$book='8085';require __DIR__.'/sgf-single-bootstrap.php';foreach([$run['root'].'/private/receipt-composition-b4093c6f6707/single-integration/20261110-193838-60b5bbb2/analysis-result.json',$run['root'].'/private/receipt-composition-b4093c6f6707/analysis-concurrency/result.json',$run['root'].'/private/receipt-composition-b4093c6f6707/single-integration/20261110-193954-bd861757/analysis-boundaries.json']as$file)if((json_decode(file_get_contents($file),true)['passed']??false)!==true)throw new LogicException('Valid affected proofs required');if(!is_file($s['root'].'/analysis-backup-pointer.json')||!$host->getSchemaBuilder()->hasTable('an_criteria'))throw new LogicException('Backup and authorized setup required');$build=$run['root'].'/private/single-analysis-build-20261110';if(!is_file($build.'/manifest.json'))throw new LogicException('Private build required');
|
|
$files=['app/Modules/Finance/FinancialIndicatorSource.php','app/Modules/Finance/FinancialIndicators.php','app/Modules/Finance/Http/FinancialIndicatorsController.php','app/Shared/Context/ModuleNavigation.php','app/Modules/Identity/Services/IdentityWorkflow.php','routes/web.php','resources/views/finance/indicators.blade.php','public/sgf-indicators.mjs'];foreach($files as$file)if(str_ends_with($file,'.php'))(new Symfony\Component\Process\Process([PHP_BINARY,'-l',$repo.'/'.$file]))->mustRun();$hashes=[];$copy=function($src,$file)use($s,$work,&$hashes){$dest=$s['app'].'/'.$file;$backup=$work.'/before/'.$file;if(is_file($dest)){if(!is_dir(dirname($backup)))mkdir(dirname($backup),0700,true);copy($dest,$backup);}if(!is_dir(dirname($dest)))mkdir(dirname($dest),0700,true);copy($src,$dest);$hashes[$file]=hash_file('sha256',$dest);};foreach($files as$file)$copy($repo.'/'.$file,$file);$cfg=$work.'/analysis_qa.php';file_put_contents($cfg,"<?php\nreturn ['enabled'=>true];\n");$copy($cfg,'config/analysis_qa.php');foreach(glob($build.'/assets/*')as$file)$copy($file,'public/build/assets/'.basename($file));$copy($build.'/manifest.json','public/build/manifest.json');file_put_contents($work.'/analysis-installation.json',json_encode(['passed'=>true,'hashes'=>$hashes,'cache_cleared'=>false,'new_demo'=>false,'native_writes'=>0,'production_source_has_fixture_fallback'=>false],JSON_PRETTY_PRINT));echo json_encode(['passed'=>true,'proof'=>$work.'/analysis-installation.json']).PHP_EOL;
|