Files
SGF/scripts/sgf-install-accounting-continuity.php
2026-11-11 09:00:17 +02:00

7 lines
1.2 KiB
PHP

<?php
use Symfony\Component\Process\Process;
$book='8085';require __DIR__.'/sgf-single-bootstrap.php';$files=['app/Modules/Accounting/ComposedLedgerController.php','app/Modules/Accounting/GeneralLedgerController.php','app/Modules/Accounting/SalesLedgerController.php','app/Modules/Accounting/CostLedgerController.php','app/Modules/Accounting/IndustrialLedgerController.php','app/Modules/Accounting/LedgerCompositionController.php','packages/general-ledger/src/PayableJournal.php','resources/views/accounting/composed-ledger.blade.php'];$hashes=[];
foreach($files as $file)if(!str_contains($file,'views/'))(new Process([PHP_BINARY,'-l',$repo.'/'.$file]))->mustRun();
foreach($files as $file){$target=$s['app'].'/'.$file;$backup=$work.'/before/'.$file;if(is_file($target)){if(!is_dir(dirname($backup)))mkdir(dirname($backup),0700,true);copy($target,$backup);}copy($repo.'/'.$file,$target);$hashes[$file]=hash_file('sha256',$target);}
file_put_contents($work.'/accounting-continuity-installation.json',json_encode(['passed'=>true,'installation'=>$tag,'source_hashes'=>$hashes,'database_writes'=>0,'cache_cleared'=>false,'native_bundle_changed'=>false],JSON_PRETTY_PRINT));echo json_encode(['passed'=>true,'proof'=>$work.'/accounting-continuity-installation.json']).PHP_EOL;