Files
dpl/scripts/theme-fuc/integration-setup.php
T
hellcat 0501711267 feat(fuc-xb): prepare isolated staging theme and VIP auto upgrades
Port the Fuc 0.12.0 frontend and default-off VIP plugin. Include the previously approved password-reset token revocation. Deploy only to an independent FUC-XB test instance; no production cutover.
2026-11-04 13:44:33 +08:00

13 lines
1.1 KiB
PHP

<?php
// Creates only a new disposable instance. Refuses to overwrite an existing one.
$root=dirname(__DIR__,2);$dir=$root.'/instances/fuc-acceptance';
if(is_dir($dir))throw new RuntimeException('Acceptance instance already exists; refusing to overwrite');
foreach(['database','bootstrap/cache','storage/framework/cache/data','storage/framework/cache/redis','storage/framework/sessions','storage/framework/views','storage/logs'] as $path)mkdir($dir.'/'.$path,0700,true);
file_put_contents($dir.'/.fuc-acceptance','isolated-fuc-acceptance-v1');
file_put_contents($dir.'/.env',"APP_ENV=testing\nAPP_KEY=base64:".base64_encode(random_bytes(32))."\nAPP_DEBUG=false\nAPP_URL=http://xb.loc\nDB_CONNECTION=sqlite\nDB_DATABASE=".$dir."/database/acceptance.sqlite\nCACHE_DRIVER=file\nSESSION_DRIVER=file\nQUEUE_CONNECTION=sync\nSITE_THEME=Fuc\n");chmod($dir.'/.env',0600);
touch($dir.'/database/acceptance.sqlite');
$app=require __DIR__.'/integration-bootstrap.php';
$exit=Illuminate\Support\Facades\Artisan::call('migrate',['--force'=>true]);
echo Illuminate\Support\Facades\Artisan::output();
exit($exit);